home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / database / auror120.zip / AML.DOC < prev    next >
Text File  |  1994-01-14  |  165KB  |  4,458 lines

  1.  
  2.  
  3.  
  4.   T h e   A u r o r a   M a c r o   L a n g u a g e   G u i d e
  5.   ─────────────────────────────────────────────────────────────
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.   The Aurora Macro Language Guide
  16.  
  17.   Version 1.20, January 1994
  18.  
  19.   Copyright (c) 1993-1994 Aurora Terra, Inc.
  20.  
  21.   ALL RIGHTS RESERVED.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.   Aurora Terra, Inc.
  29.   P.O. Box 34275
  30.   Bethesda, MD. 20827-0275  USA
  31.   301-468-2255  (Voice)
  32.   301-230-1214  (BBS 14,400 V.32bis)
  33.  
  34.  
  35.  
  36.   The Aurora Editor is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  37.   The Aurora Editor/386 is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  38.   The Aurora Macro Language is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  39.  
  40.   No parts of The Aurora Editor software or this document may be copied
  41.   in part or in whole, except as provided by the License in the
  42.   following pages.
  43.  
  44.   This version of The Aurora Editor is NOT public domain or free
  45.   software, but is distributed as "shareware" for evaluation purposes
  46.   only. Please refer to the license information in the following pages.
  47.  
  48.   The Aurora Editor is a trademark of Aurora Terra, Inc.
  49.   The Aurora Editor/386 is a trademark of Aurora Terra, Inc.
  50.   The Aurora Macro Language is a trademark of Aurora Terra, Inc.
  51.  
  52.   Other product names found throughout this document are trademarks of
  53.   various companies.
  54.                                                   Table of Contents   ii
  55.  
  56.  
  57.   Table of Contents
  58.   ─────────────────
  59.  
  60.   I-1  Introduction..................................................iii
  61.  
  62.   1-1  The Aurora Macro Language.......................................1
  63.   1-2  Macro Language Sentences........................................2
  64.   1-3  Comments........................................................3
  65.   1-4  Evaluating Arguments............................................3
  66.   1-5  Function Call Series............................................4
  67.   1-6  Variables.......................................................5
  68.   1-7  Native Functions................................................6
  69.   1-8  Defining Functions..............................................8
  70.   1-9  Control Functions..............................................10
  71.   1-10  Logical Functions.............................................11
  72.   1-11  Objects.......................................................12
  73.   1-12  Handling Events...............................................14
  74.   1-13  The Interpreter and Compiler..................................16
  75.  
  76.   2-1  Native Function List...........................................17
  77.  
  78.   3-1  Native Functions - In Detail...................................24
  79.   3-2  Definition Functions...........................................25
  80.   3-3  Conditional Functions..........................................26
  81.   3-4  Logical Functions..............................................27
  82.   3-5  Bitwise Logical Functions......................................27
  83.   3-6  Control Functions..............................................28
  84.   3-7  Arithmetic Functions...........................................28
  85.   3-8  String Functions...............................................29
  86.   3-9  Evaluation and Compilation Functions...........................32
  87.   3-10  Miscellaneous Functions.......................................33
  88.   3-11  Object Functions..............................................34
  89.   3-12  Disk Functions................................................36
  90.   3-13  System Functions..............................................41
  91.   3-14  Timer Functions...............................................44
  92.   3-15  Keyboard Functions............................................45
  93.   3-16  Mouse Functions...............................................47
  94.   3-17  Queue Functions...............................................48
  95.   3-18  Video Functions...............................................50
  96.   3-19  Text Buffer Functions.........................................53
  97.   3-20  Mark Functions................................................61
  98.   3-21  Window Functions..............................................70
  99.  
  100.   A-1  The Aurora Macro Language and The Aurora Editor................85
  101.  
  102.                                                        Introduction  iii
  103.  
  104.  
  105.   Warranty Disclaimer
  106.   ───────────────────
  107.  
  108.   Aurora Terra makes no warranty of any kind, either express or implied,
  109.   including but not limited to implied warranties of merchantability and
  110.   fitness for a particular purpose, with respect to this software and
  111.   accompanying documentation.
  112.  
  113.   IN NO EVENT SHALL AURORA TERRA BE LIABLE FOR ANY DAMAGES RESULTING
  114.   FROM THE USE OF THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO, DAMAGES
  115.   FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
  116.   INFORMATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES, OR OTHER FINANCIAL
  117.   LOSS ARISING OUT OF THE USE OF OR INABILITY TO USE THIS PROGRAM, EVEN
  118.   IF AURORA TERRA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  119.  
  120.  
  121.   I-1  Introduction
  122.   ─────────────────
  123.  
  124.   This is The Aurora Macro Language Guide. It describes all of the
  125.   features and native functions of The Aurora Macro Language. Prior
  126.   knowledge of another programming language such as C or Pascal may be
  127.   helpful in understanding this document.
  128.  
  129.   For information on how to install, configure, and use The Aurora
  130.   Editor, see "The Aurora Editor Users Guide".
  131.  
  132.   It is not necessary to understand all the details of the Aurora Macro
  133.   Language to use The Aurora Editor. However, experienced users may find
  134.   the macro language to be very useful for writing new editor functions,
  135.   or in configuring detailed aspects of the editor. Knowledge of the
  136.   macro language may also help you to better understand the keyboard
  137.   definition (AKBD.A), menu definition (AMEN.A), configuration (ACFG.A),
  138.   and text translation definition (ATRN.A) files for The Aurora Editor.
  139.  
  140.   This document describes macro language "native" functions which are
  141.   built in to The Aurora Macro Language. The Aurora Editor also uses
  142.   many "library functions" which are built up from native functions and
  143.   are contained in the file ALIB.X. Library functions are documented in
  144.   The Aurora Editor Users Guide (A.DOC), and summarized in The Aurora
  145.   Editor Quick Reference (AREF.DOC).
  146.                                            The Aurora Macro Language   1
  147.  
  148.  
  149.   1-1  The Aurora Macro Language
  150.   ──────────────────────────────
  151.  
  152.   The Aurora Macro Language is a flexible, interpreted language, which
  153.   is simple in syntax, yet rich in function. A primary design goal was
  154.   to keep the macro language interpreter and compiler small enough so
  155.   they would fit in the same .EXE file as the rest of the editor. This
  156.   allows the editor to execute macro language expressions interactively
  157.   within an editor session, and greatly enhances the overall flexibility
  158.   of the editor. Both the interpreter and compiler are accessible as
  159.   native functions within the macro language itself.
  160.  
  161.   The Aurora Macro Language may appear somewhat similar to LISP in
  162.   syntax, but the resemblance ends there. The Aurora Macro Language is
  163.   primarily a "string-oriented" language with "the string" as the only
  164.   visible data type. All functions and data are viewed as character
  165.   strings and can be manipulated as character strings. Since there is
  166.   only one data type, no variable declarations are required.
  167.  
  168.   The Aurora Macro language is also "object-oriented". Functions and
  169.   data can be encapsulated into "objects", and object hierarchies can be
  170.   created with "inheritance" and "multiple inheritance". Inheritance
  171.   hierarchies can also be dynamically altered.
  172.  
  173.  
  174.   1-2  Macro Language Sentences
  175.   ─────────────────────────────
  176.  
  177.   Each program in written in The Aurora Macro Language is really just a
  178.   string composed of a series of macro language "sentences". Each
  179.   sentence is composed of a series of "words" separated by spaces, and
  180.   each sentence is usually terminated by a period. The first word in
  181.   each sentence is the name of a function to execute, and any words that
  182.   follow are arguments to the function. For example:
  183.  
  184.     abc 1 2 3.
  185.     xyz "foo" "bar" x.
  186.  
  187.   In the above example, two sentences are evaluated. The arguments "1",
  188.   "2", and "3" are passed to the function "abc", and the strings "foo",
  189.   "bar", and the variable "x" are passed to the function "xyz".
  190.  
  191.   Function names can be up to 255 characters in length and may contain
  192.   any characters. You can use "native" (built-in) functions, or define
  193.   your own functions.
  194.                                             Macro Language Sentences   2
  195.  
  196.  
  197.   A function can have up to 100 arguments, or no arguments at all.
  198.   Arguments to a function may be integers from -2147483647 to
  199.   +2147483647, strings enclosed in double quotes, variables, or even
  200.   other sentences.
  201.  
  202.   Hex integers can be specified by adding an "h" at the end of the
  203.   integer. A leading zero is required if the hex integer begins with an
  204.   alphabetic character. For example, "1h", "3CH", and "0FFFFh" are valid
  205.   hex integers.
  206.  
  207.   Strings may be up to 16000 characters in length, and variable names
  208.   may be up to 255 characters in length.
  209.  
  210.   If an argument to a function is another sentence, it must be enclosed
  211.   in parentheses:
  212.  
  213.     abc 1 (xyz "foo" "bar" x) 3.
  214.  
  215.   In the above example, the arguments "foo", "bar", and the value of the
  216.   variable "x" are passed to the function "xyz". The result of
  217.   evaluating "xyz" becomes the second argument to the function "abc".
  218.   Note that a terminating period is not required for the sentence
  219.   beginning with "xyz" since it is already terminated by a right
  220.   parenthesis.
  221.  
  222.   An argument may also be composed of more than one sentence. In this
  223.   case, the value of the argument is the value of the last sentence:
  224.  
  225.     abc 1 (alpha "foo" "bar". beta. gamma 5 6) 3.
  226.  
  227.   In the above example, the value of the second argument to "abc" is the
  228.   result of evaluating the sentence "gamma 5 6".
  229.  
  230.   A sentence may be spread out over more than one line and spaces may be
  231.   inserted anywhere in the sentence, as long as the words in the
  232.   sentence are not split. The above example could also be written as:
  233.  
  234.     abc 1 (
  235.       alpha "foo" "bar".
  236.       beta.
  237.       gamma 5 6
  238.     )  3.
  239.                                                             Comments   3
  240.  
  241.  
  242.   1-3  Comments
  243.   ─────────────
  244.  
  245.   Single line and multi-line comments can be inserted anywhere within a
  246.   macro language program. In a single line comment, any characters
  247.   located between two slashes (//) and the end of the line are ignored
  248.   (except if they are contained within a double quoted string). For
  249.   example:
  250.  
  251.     abc 1 2 3.           // this is a single line comment
  252.     xyz "foo" "bar" x.   // this is another single line comment
  253.  
  254.   Multi-line comments can span any number of lines. For multi-line
  255.   comments, any characters located between the comment delimiters "/*"
  256.   and "*/" are ignored. For example:
  257.  
  258.     abc 1 2 3.
  259.        /* this is a
  260.           multi-line comment */
  261.     xyz "foo" "bar" x.
  262.  
  263.  
  264.   1-4  Evaluating Arguments
  265.   ─────────────────────────
  266.  
  267.   When the interpreter evaluates a macro language sentence, each
  268.   argument in the sentence is evaluated from first to last. The
  269.   resulting values for each argument are passed to the function (the
  270.   first "word" in the sentence) and the function is evaluated. For
  271.   example:
  272.  
  273.     abc 1 "foo" x (xyz 5 6).
  274.  
  275.   In the above macro language sentence, the first argument evaluates
  276.   to "1", the second argument evaluates to "foo", the third argument
  277.   evaluates to value of the variable "x", and the fourth argument
  278.   evaluates to the value of the sentence "xyz 5 6".
  279.  
  280.   You can prevent the evaluation of an argument by prefixing it with
  281.   the "literal" operator (%). For example:
  282.  
  283.     abc 1 "foo" %x (xyz 5 6).
  284.  
  285.   The difference between the above example and the previous example is
  286.   that the third argument is now the string "x", not the variable "x" (x
  287.   is not evaluated). As you can see from the above example, using the
  288.   literal operator (%) can also be a convenient way to specify string
  289.   arguments (that contain no blanks), without enclosing the string in
  290.   double quotes.
  291.                                                 Evaluating Arguments   4
  292.  
  293.  
  294.   If all of the function arguments are prefixed with the literal (%)
  295.   operator, you can remove the literal operator from the arguments and
  296.   attach it to the end of the function name. For example:
  297.  
  298.     xyz %foo %bar %x.
  299.  
  300.       is equivalent to:
  301.  
  302.     xyz% foo bar x.
  303.  
  304.   In both the examples above, the strings "foo", "bar", and "x" are
  305.   passed to the function "xyz". Note that some native functions in the
  306.   macro language (such as the "fun" function) do not normally evaluate
  307.   their arguments. These functions automatically assume that all
  308.   arguments are "literal", without having to use the literal operator.
  309.  
  310.   The inverse of the literal operator is the "evaluation" operator (@).
  311.   This operator forces evaluation of an argument, even when the function
  312.   name is suffixed with the literal operator (%). For example:
  313.  
  314.     xyz% foo bar @x.
  315.  
  316.   In the example above, the third argument evaluates to the value of the
  317.   variable "x", not the string "x". The first and second arguments still
  318.   evaluate to the strings "foo" and "bar".
  319.  
  320.   Both the literal operator (%) and the evaluation operator (@) can be
  321.   used to specify "null" arguments (strings of zero length) when they
  322.   are specified by themselves. For example:
  323.  
  324.     xyz @ % %foobar.
  325.  
  326.   In the example above, the first and second arguments are "null"
  327.   strings, and the third argument is the string "foobar".
  328.  
  329.  
  330.   1-5  Function Call Series
  331.   ─────────────────────────
  332.  
  333.   In many programming languages, the situation often arises where the
  334.   same function is called many times in series, each time with different
  335.   arguments. The Aurora Macro Language provides a convenient way to
  336.   handle this situation: just specify the function name once and then
  337.   specify each set of arguments separated by commas. For example:
  338.  
  339.     abc 1 2 3.
  340.     abc 4 5 6.
  341.     abc 7 8 9.
  342.                                                 Function Call Series   5
  343.  
  344.  
  345.       is equivalent to:
  346.  
  347.     abc 1 2 3, 4 5 6, 7 8 9.
  348.  
  349.  
  350.   1-6  Variables
  351.   ──────────────
  352.  
  353.   The Aurora Macro Language allows you to assign values to variables
  354.   which are local to a function definition, or that reside in a macro
  355.   language "object" (see the "Defining Functions" and "Objects" sections
  356.   below for a description of function definitions and objects).
  357.  
  358.   Variables local to a function are referred to as "local" variables,
  359.   whereas variables that reside in an object are referred to as "object"
  360.   variables. There is no need to define either of these variables. Both
  361.   variable types are defined the first time a variable assignment is
  362.   made.
  363.  
  364.   The native function "=" is used to assign a value to a local variable.
  365.   For example:
  366.  
  367.     = %x 3.    // local variable x is assigned a value of "3"
  368.  
  369.   Note that in the example above, the argument "x" must be preceded by
  370.   the literal operator (%), otherwise the VALUE of the variable "x"
  371.   (instead of the variable "x") would be assigned the value "3".
  372.   The above example could also have been written as:
  373.  
  374.     = "x" 3.   // local variable x is assigned a value of "3"
  375.  
  376.   Local variable assignments exist until they are re-assigned or until
  377.   the function in which they are contained returns.
  378.  
  379.   To assign a value to a "object" variable, use the "set" native
  380.   function. The assignment will be made in the "default" object, unless
  381.   an object name is explicitly specified between two slash (/)
  382.   characters. For example:
  383.  
  384.     set %x 3.          // object variable x in the "default" object is
  385.                        //   assigned the value "3"
  386.     set %/aurora/x 3.  // object variable x in the object "aurora" is
  387.                        //   assigned the value "3"
  388.  
  389.   Object variable assignments exist until they are re-assigned or until
  390.   the object in which they are located is destroyed. Since object
  391.   variable assignments can remain in effect across function calls, they
  392.   are considered to be "global" variables.
  393.                                                            Variables   6
  394.  
  395.  
  396.   These are more examples of variable assignments:
  397.  
  398.     =% x foobar.            // assigns "foobar" to local variable x
  399.     = %i x.                 // assigns the value of x to local var i
  400.     = %i (abc 3 x).         // assigns the value of the expression
  401.                             //   "abc 3 x" to local variable i
  402.  
  403.     set% x foobar.          // assigns "foobar" to object variable x
  404.                             //   (in the default object)
  405.     set %x y.               // assigns the value of y to object var x
  406.     set %x (xyz).           // assigns the value of the function
  407.                             //   "xyz" to object variable x
  408.     set (xyz) %x.           // assigns "x" to the variable name which
  409.                             //   is the value of function "xyz"
  410.     set %/aurora/x y.       // assigns the value of y to object var x
  411.                             //   in the object "aurora"
  412.  
  413.   When a reference is made to a variable which has never been assigned a
  414.   value (a "non-existent" variable), the value of that variable is
  415.   always the "null" string (a string of length zero).
  416.  
  417.   Note that when variables are referenced, local variables have higher
  418.   precedence than object variables. For example:
  419.  
  420.     = %x 4.
  421.     set %x 5.
  422.     abc x.
  423.  
  424.   In the example above, the value "4" will be passed to the function
  425.   "abc". The argument "x" to function "abc" refers to the local variable
  426.   "x", not the object variable "x".
  427.  
  428.  
  429.   1-7  Native Functions
  430.   ─────────────────────
  431.  
  432.   The Aurora Macro Language has hundreds "native" functions, which are
  433.   pre-defined or "built-in". A few commonly used native functions may be
  434.   used in later examples and are worth mentioning briefly here:
  435.  
  436.  
  437.   Conditional:
  438.  
  439.     eq     returns "1" if all of its arguments are equal, otherwise
  440.            it returns the null string.
  441.  
  442.     ne     returns "1" if all of its arguments are not equal,
  443.            otherwise it returns the null string.
  444.                                                     Native Functions   7
  445.  
  446.  
  447.     >      returns "1" if each of its arguments is numerically
  448.            greater than the argument which follows, otherwise it
  449.            returns the null string.
  450.  
  451.     <      returns "1" if each of its arguments is numerically less
  452.            than the argument which follows, otherwise it returns the
  453.            null string.
  454.  
  455.  
  456.   Arithmetic:
  457.  
  458.     +      returns the numeric sum of all of its arguments.
  459.  
  460.     -      if only one argument is specified, it returns the numeric
  461.            negative of the argument, otherwise it returns the value of
  462.            the first argument minus all the arguments which follow.
  463.  
  464.     *      returns the numeric product of all of its arguments.
  465.  
  466.     /      returns the value of the first argument divided by all the
  467.            arguments which follow.
  468.  
  469.  
  470.   String:
  471.  
  472.     cat    concatenates all of its arguments and returns the result.
  473.  
  474.     sub    returns the substring of its first argument taken from the
  475.            position of the second argument and extending for the
  476.            length of the third argument.
  477.  
  478.     fin    searches for the second argument inside the first argument
  479.            and returns the position if found, otherwise it returns
  480.            null.
  481.  
  482.  
  483.   Other:
  484.  
  485.     beep   beeps the PC speaker at the frequency of the first argument
  486.            for the duration of the second argument.
  487.  
  488.  
  489.   Library:
  490.  
  491.     say    displays a message on the window title bar (this function is
  492.            documented in "The Aurora Editor Users Guide").
  493.                                                   Defining Functions   8
  494.  
  495.  
  496.   1-8  Defining Functions
  497.   ───────────────────────
  498.  
  499.   The Aurora Macro Language has many native functions which are
  500.   pre-defined when a macro language program is evaluated. No further
  501.   definitions are required to use native functions.
  502.  
  503.   To create your own functions, you must first define them with the
  504.   native function "fun". For example:
  505.  
  506.     fun  hello (
  507.       say "hello".
  508.       beep 300 300.
  509.     ).
  510.  
  511.   In the example above, the function "hello" is defined. Note that the
  512.   native function "fun" automatically assumes that both its arguments
  513.   are literal. The literal operator (%) is not required. Also note that
  514.   the definition of "hello" is a macro language "sentence", and
  515.   therefore requires a terminating period.
  516.  
  517.   Arguments passed to user-defined functions can be accessed with the
  518.   the "arg" and "qarg" native functions. The "arg" native function maps
  519.   any arguments passed to the function to local variables within the
  520.   function. For example:
  521.  
  522.     fun  hello (
  523.       arg s f.
  524.       say s.
  525.       beep f 300.
  526.     ).
  527.  
  528.   In the example above, the local variables "s" and "f" are mapped to
  529.   the first two arguments passed to "hello". The variables "s" and "f"
  530.   can then be used in any expression within the function. This does not
  531.   mean that exactly two arguments must always be passed to "hello". Any
  532.   number of arguments may be passed to any function. If only one
  533.   argument were passed to the function "hello" in the example above, the
  534.   value of the local variable "f" would be the null string. If three
  535.   arguments were passed to "hello", the third argument would not be
  536.   accessible as a local variable.
  537.  
  538.   The "qarg" native function allows you access function arguments by the
  539.   order in which they where passed. The "qarg" function takes one
  540.   argument: the relative position of the argument being passed to the
  541.   function. The following example is equivalent to the previous example:
  542.                                                   Defining Functions   9
  543.  
  544.  
  545.     fun  hello (
  546.       say (qarg 1).
  547.       beep (qarg 2) 300.
  548.     ).
  549.  
  550.   Note that "qarg 0" will return total number of arguments passed to the
  551.   function.
  552.  
  553.   Remember that you can call any function with any number of arguments
  554.   at any time. The number of arguments is always determined by the
  555.   function call, not the function.
  556.  
  557.   It is also possible to call non-existent or undefined functions.
  558.   Calling an undefined function will always return the value of the last
  559.   argument passed to the undefined function. Calling a defined function
  560.   returns the value of the last sentence in the function. For example:
  561.  
  562.     fun  abc (
  563.       arg x y.
  564.       dothis 1 x.
  565.       dothat 2 y.
  566.       hello x y.
  567.     ).
  568.  
  569.     abc "hello world" 300.
  570.  
  571.   In the example above, the function "abc" is defined and then called
  572.   with the arguments "hello world" and "300". The return value of the
  573.   call to "abc" would be the result of evaluating the last sentence
  574.   "hello x y". If the function "hello" is not defined, the return value
  575.   of "abc" would be "300".
  576.  
  577.   It is also possible to call the "null" function by using the literal
  578.   operator (%) or the evaluation operator (@) as the function name.
  579.   Since the null function is not defined, it always returns the value of
  580.   the last argument passed to it. This can be useful for returning
  581.   variables or constant values from a function. For example:
  582.  
  583.     fun  xyz (
  584.       = %x 3.
  585.       % x.
  586.     ).
  587.  
  588.     set %y (xyz).
  589.  
  590.   In the example above, the function "xyz" is defined and then called
  591.   with no arguments. The function "xyz" assigns "3" to the local
  592.   variable "x" and then returns the value of "x" (3). The object
  593.   variable "y" is then assigned a value of "3".
  594.                                                   Control Functions   10
  595.  
  596.  
  597.   1-9  Control Functions
  598.   ──────────────────────
  599.  
  600.   There are several native functions which can be used to control the
  601.   flow of execution of a macro language program. Note that no special
  602.   syntax is required to use control functions. They are treated just
  603.   like any other function. The difference between control functions and
  604.   other functions is that not all of the arguments to a control function
  605.   are always evaluated.
  606.  
  607.   Perhaps the most commonly-used control function is the "if" function.
  608.   The first argument of the "if" function is always evaluated. If the
  609.   first argument does not evaluate to zero or null, then the second
  610.   argument is evaluated, otherwise the third argument is evaluated. The
  611.   return value of the "if" function is the value of the second or third
  612.   argument, depending on which one is evaluated. For example:
  613.  
  614.     if x (abc) (xyz).
  615.  
  616.   In the example above, if the variable x is "0" or null, then the
  617.   function "xyz" is evaluated, otherwise the function "abc" is
  618.   evaluated.
  619.  
  620.   "Conditional" native functions such as "eq" are often used with the
  621.   "if" function. For example:
  622.  
  623.     if (eq s "yes") (
  624.       = %x 1.
  625.       beep 700 200.
  626.     )(
  627.       = %x 2.
  628.       beep 200 200.
  629.     ).
  630.  
  631.   In the example above, if the variable "s" is equal to "yes", the value
  632.   "1" is assigned to local variable "x" and a high-pitched beep is
  633.   heard. If "s" is not equal to "yes", the value "2" is assigned to "x"
  634.   and low-pitched beep is heard.
  635.  
  636.   The "if" function can be used anywhere that any other function can be
  637.   used. For example:
  638.  
  639.     = %x (if (eq s "no") "nope" "yup").
  640.  
  641.   In the example above, if "s" is equal to "no", then the value "nope"
  642.   is assigned to "x", otherwise the value "yup" is assigned to "x".
  643.                                                   Control Functions   11
  644.  
  645.  
  646.   The "while" and "dowhile" functions are control functions which can be
  647.   used to perform looping operations. The "while" function will evaluate
  648.   its first and second arguments repeatedly while its first argument
  649.   is "true" (non-null and non-zero). For example:
  650.  
  651.     = %x 1000.
  652.     while x (
  653.       beep x 200.
  654.       = %x (- x 100).
  655.     ).
  656.  
  657.   In the example above, the PC speaker will beep 10 times, each time
  658.   with decreasing frequency.
  659.  
  660.   The "dowhile" function is similar to the "while" function, except that
  661.   the first and second arguments are evaluated repeatedly until the
  662.   second argument evaluates to "false" (null or zero). The following
  663.   example is equivalent to the previous example:
  664.  
  665.     = %x 1000.
  666.     dowhile (
  667.       beep x 200.
  668.       = %x (- x 100).
  669.     ) x.
  670.  
  671.  
  672.   1-10  Logical Functions
  673.   ───────────────────────
  674.  
  675.   The logical functions test the logical values of their arguments to
  676.   return either "1" (true) or null (false). Like the control functions
  677.   (see above), not all of the arguments to a logical function are always
  678.   evaluated.
  679.  
  680.   The following logical functions are available:
  681.  
  682.     and    returns "1" if all its arguments evaluate to "true"
  683.            (non-null and non-zero). If an argument does not evaluate
  684.            to "true", then no more arguments are evaluated.
  685.  
  686.     or     returns "1" if at least one of its arguments evaluate to
  687.            "true". No more arguments are evaluated after the first
  688.            "true" argument is found.
  689.  
  690.     !      returns "1" if all of its arguments evaluate to "false",
  691.            otherwise it returns null. All arguments are evaluated.
  692.  
  693.   The following example demonstrates the use of logical functions:
  694.                                                   Logical Functions   12
  695.  
  696.  
  697.     if (and ((eq x 3) (or y z))) (beep 400 400).
  698.  
  699.   In the example above, a beep is heard only if the variable "x" is "3",
  700.   and at least one of the variables "y" or "z" are true (non-null and
  701.   non-zero).
  702.  
  703.  
  704.  
  705.   1-11  Objects
  706.   ─────────────
  707.  
  708.   In The Aurora Macro Language, an object is a user-defined group of
  709.   function definitions and variable assignments. Each object has a name
  710.   (up to 255 characters). By default, all object variables and functions
  711.   are placed in the pre-defined object "a". The object "a" is
  712.   automatically created by the interpreter whenever a macro language
  713.   program is evaluated.
  714.  
  715.   To create a new object, you must use the native function "objnew". For
  716.   example:
  717.  
  718.     objnew% aurora 17.
  719.  
  720.   In the example above, a new object called "aurora" will be created.
  721.   The object "aurora" will have an estimated size of 17 function
  722.   definitions and/or variable settings (this size estimate is used by
  723.   the interpreter to create an optimized internal index).
  724.  
  725.   To add functions or variable assignments to the object you created,
  726.   use the "obj" native function:
  727.  
  728.     obj  aurora  (
  729.  
  730.       set %x 1.        // assign 1 to variable x in object "aurora"
  731.       set %y 2.        // assign 2 to variable y in object "aurora"
  732.  
  733.       fun  abc (       // define function "abc" in object "aurora"
  734.         say "abc".
  735.       ).
  736.  
  737.       fun  xyz (       // define function "xyz" in object "aurora"
  738.         say "xyz".
  739.       ).
  740.  
  741.     ).
  742.  
  743.   In the example above, any variable assignments or function definitions
  744.   within the scope of the "obj" sentence will be added to the object
  745.   "aurora" (the default object is "aurora" inside the obj sentence).
  746.   Variable assignments or functions definitions made outside the scope
  747.   of the "obj" sentence would be added to the default object "a".
  748.                                                             Objects   13
  749.  
  750.  
  751.   Like the "fun" native function, the "obj" native function assumes that
  752.   all its arguments are literal. The literal operator (%) is not
  753.   required.
  754.  
  755.   An object can "inherit" the functions and variable assignments of
  756.   other objects by grouping them together in "inheritance paths". When a
  757.   reference to function or variable is made, and it is not found in the
  758.   current "default" object, then the object's inheritance path is
  759.   searched until the reference is found. This mechanism works similar to
  760.   the way the DOS "PATH" environment variable is searched when executing
  761.   DOS programs, except that it is also possible to create hierarchal
  762.   search paths.
  763.  
  764.   The searching of inheritance paths is performed automatically by the
  765.   macro language interpreter and is transparent to any function call or
  766.   variable reference. Note that "native" functions are always accessible
  767.   from within any object.
  768.  
  769.   The inheritance path or "ancestry" of an object can be defined when
  770.   the object is created with the "objnew" command. For example:
  771.  
  772.     objnew% aurora 17 obj1 obj2.
  773.  
  774.   In the example above, the object "aurora" is created and assigned the
  775.   inheritance path "obj1 obj2". When a reference to a function or
  776.   variable in the object "aurora" fails, the objects "obj1" and "obj2"
  777.   are searched for the reference (in the order they are specified). In
  778.   this way the object "aurora" is said to "inherit" the functions and
  779.   object variables of "obj1" and "obj2". Using inheritance, the object
  780.   "aurora" appears to contain all of the functions and variables of
  781.   "obj1" and "obj2". Note that the objects "obj1" and "obj2" may also
  782.   have inheritance paths. In this way, hierarchal inheritance paths can
  783.   be established.
  784.  
  785.   Consider the following example:
  786.  
  787.     objnew% obj1 1, obj2 1.
  788.     objnew% aurora 3 obj1 obj2.
  789.  
  790.     obj  obj1 (
  791.       set% s hello.
  792.     ).
  793.  
  794.     obj  obj2 (
  795.       fun  hello (
  796.         arg x y.
  797.         say x.
  798.         beep y 300.
  799.       ).
  800.     ).
  801.                                                             Objects   14
  802.  
  803.  
  804.     obj  aurora (
  805.       hello s 400.
  806.     ).
  807.  
  808.   In the example above, the function "hello" is called with the
  809.   arguments "s" and "400". Since there is no function "hello" in the
  810.   object "aurora", the inheritance path for "aurora" is searched and
  811.   "hello" is found in "obj2". Also, since object "aurora" has no
  812.   variable "s", the inheritance path is searched and "s" is found in
  813.   "obj1".
  814.  
  815.   Object inheritance paths can also be changed dynamically via the
  816.   "objpar" native function. For example:
  817.  
  818.     objpar% aurora obj3 obj4.
  819.  
  820.   In the example above, the inheritance path for the object "aurora" is
  821.   changed to "obj3 obj4".
  822.  
  823.  
  824.   Functions and variables in other objects can be referenced directly by
  825.   specifying the object name between slash (/) characters immediately
  826.   before the function name or variable name. For example:
  827.  
  828.     abc 1 2 /aurora/x.     // variable x in object "aurora"
  829.  
  830.     /obj2/xyz "foobar".    // function "xyz" in object "obj2"
  831.  
  832.  
  833.  
  834.   1-12  Handling Events
  835.   ─────────────────────
  836.  
  837.   Event Handling is a built-in feature of The Aurora Macro Language.
  838.   When an external or internal event occurs (a keystroke, mouse event,
  839.   or timer event), it is posted to the interpreter event queue. The next
  840.   time the interpreter is idle, it will read the event from the event
  841.   queue, translate it into a pre-defined function name (with arguments
  842.   if applicable), and attempt to call the function. If the user has
  843.   properly defined a function with the same pre-defined function name,
  844.   the user's function will be called automatically by the interpreter.
  845.  
  846.   When the interpreter calls the user's function, it will always look
  847.   for the function in the current "event object" (the event object is
  848.   not necessarily the same object as the default object). Only one
  849.   object can be the event object at any given time. When a macro
  850.   language program is initially evaluated, the event object is the
  851.   default object "a", but that can be changed at any time by the program
  852.   (see below).
  853.                                                     Handling Events   15
  854.  
  855.  
  856.   If the function is not found in the event object, the interpreter will
  857.   search the event object's inheritance path for the event function. In
  858.   this way, an object inherits the event-handling capabilities of its
  859.   ancestor objects.
  860.  
  861.   It is often useful to change the entire behavior of the keyboard and
  862.   mouse simply by making another object the event object. For example,
  863.   when you switch from a File Manager window to an Edit window, The
  864.   Aurora Editor simply changes current event object, and a whole
  865.   different set of keyboard functions and mouse functions become active.
  866.  
  867.   To change the current event object, use the native function "objeve":
  868.  
  869.     objeve %aurora2.
  870.  
  871.   In the example above, the object "aurora2" becomes the current event
  872.   object.
  873.  
  874.  
  875.   You can place your own user-generated events in the interpreter event
  876.   queue using the native function "que". For example:
  877.  
  878.     que% xyz 1 3.
  879.  
  880.   In the example above, the function call "xyz 1 3" is placed on the
  881.   interpreter event queue. The next time the interpreter is idle, it
  882.   will read "xyz 1 3" from the event queue and evaluate it in the
  883.   current event object, just like a keyboard or mouse event.
  884.  
  885.   User-generated events can also be directed to an explicitly specified
  886.   object (other than the event object), by using the native function
  887.   "queobj". For example:
  888.  
  889.     queobj% aurora xyz 1 3.
  890.  
  891.   In the example above, "xyz 1 3" is placed on the interpreter event
  892.   queue. However, when the interpreter later reads "xyz 1 3" from the
  893.   event queue, it will force the evaluation of "xyz 1 3" to occur in the
  894.   object "aurora", not in the current event object.
  895.  
  896.   The native functions "send" and "sendobj" work just like "que" and
  897.   "queobj" above, except that the interpreter event queue is bypassed.
  898.   The functions specified in "send" and "sendobj" are always called
  899.   immediately. For example:
  900.  
  901.     send% xyz 1 3.
  902.     sendobj% aurora abc 5 7.
  903.                                                     Handling Events   16
  904.  
  905.  
  906.   In the examples above, "xyz 1 3" is evaluated immediately in the
  907.   current event object, and "abc 5 7" is evaluated immediately in the
  908.   object "aurora".
  909.  
  910.  
  911.   1-13  The Interpreter and Compiler
  912.   ──────────────────────────────────
  913.  
  914.   The Aurora Macro Language contains native functions for compiling and
  915.   evaluating macro language code.
  916.  
  917.   To evaluate a string of macro language source code from within a macro
  918.   language program, use the "evl" function. For example:
  919.  
  920.     = %x "+ 4 5 6".
  921.     = %y (evl x).
  922.  
  923.   In the example above, the local variable "x" is assigned a string
  924.   which is a macro language expression. In the next sentence, the "evl"
  925.   function evaluates the value of "x" and assigns the result (15) to
  926.   "y".
  927.  
  928.   Since there are many native functions for manipulating strings, you
  929.   can actually construct code dynamically and execute it from within a
  930.   running macro language program using the "evl" function.
  931.  
  932.   To evaluate macro language code in a file on disk, use the native
  933.   function "objdsk". For example:
  934.  
  935.     objdsk %aurora "test.a" 3 4.
  936.  
  937.   In the example above, the contents of the file "test.a" are evaluated
  938.   and passed the arguments "3" and "4", with "aurora" as the default
  939.   object. The "objdsk" command will evaluate both macro language source
  940.   and compiled files (compiled files will execute faster).
  941.  
  942.   To compile a macro language source file on disk, use the native
  943.   function "comf". For example:
  944.  
  945.     comf "test.a" "test.x".
  946.  
  947.   In the example above, the file "test.a" is compiled and the result is
  948.   placed in the file "test.x".
  949.  
  950.   You can use any filenames you wish for source and compiled files. The
  951.   convention is to use the file extension ".A" for macro language source
  952.   files, and ".X" for compiled macro language files.
  953.                                                Native Function List   17
  954.  
  955.  
  956.   2-1  Native Function List
  957.   ─────────────────────────
  958.  
  959.   The following section summarizes all available native macro language
  960.   functions by category. Each native function is followed by a brief one
  961.   line description.
  962.  
  963.  
  964.   Definition Functions:
  965.  
  966.     =     - assign a value to a local variable
  967.     set   - assign a value to an object variable
  968.     ren   - rename an object variable or function
  969.     uns   - remove an object variable or function from an object
  970.  
  971.     fun   - define a function
  972.     arg   - map function arguments to local variables
  973.     qarg  - access function arguments by ordinal number
  974.  
  975.  
  976.   Conditional Functions:
  977.  
  978.     eq   - test strings for equality
  979.     eqi  - test strings for equality (ignoring case)
  980.     ne   - test strings for inequality
  981.     ==   - test integers for equality
  982.     !=   - test integers for inequality
  983.     <    - test if each argument is less than the next
  984.     >    - test if each argument is greater than the next
  985.     <=   - test if each argument is less than or equal to the next
  986.     >=   - test if each argument is greater than or equal to the next
  987.  
  988.  
  989.   Logical Functions:
  990.  
  991.     and  - test if all arguments are true
  992.     or   - test if one argument is true
  993.     !    - test if no arguments are true
  994.  
  995.  
  996.   Bitwise Functions:
  997.  
  998.     &    - return the "bitwise and" of two strings
  999.     |    - return the "bitwise or" of two strings
  1000.     ^    - return the "bitwise exclusive or" of two strings
  1001.                                                Native Function List   18
  1002.  
  1003.  
  1004.   Control Flow Functions:
  1005.  
  1006.     if       - if-then-else structure
  1007.     while    - loop while first argument is true
  1008.     dowhile  - loop while second argument is true
  1009.  
  1010.  
  1011.   Arithmetic Functions:
  1012.  
  1013.     +    - add all arguments together
  1014.     -    - subtract arguments from first argument
  1015.     *    - multiply all arguments together
  1016.     /    - divide first argument by other arguments
  1017.     mod  - return modulus of first argument divided by second argument
  1018.  
  1019.  
  1020.   String Functions:
  1021.  
  1022.     cat  - concatenates all arguments
  1023.     sub  - get a substring of the first argument
  1024.     fin  - search for a string in another string, with optional replace
  1025.     siz  - return the total size (in bytes) of arguments
  1026.     dup  - duplicate a string any number of times
  1027.     wrd  - set the character set to define a "word"
  1028.     idx  - search for the first of a group of characters in a string
  1029.     vfy  - verify that a string is composed of specified characters
  1030.     chc  - change the case of a string
  1031.  
  1032.     byte - convert an integer to a 1-byte string
  1033.     word - convert an integer to a 2-byte string
  1034.     long - convert an integer to a 4-byte string
  1035.     hex  - convert a hex string to a normal string
  1036.     toh  - convert a normal string to a hex string
  1037.  
  1038.  
  1039.   Evaluation and Compilation Functions:
  1040.  
  1041.     evl  - evaluate a string as macro language code
  1042.     evla - evaluate a string as if it were a function argument
  1043.     comf - compile a macro language source file
  1044.     #get - include a macro language source or compiled file
  1045.     var  - evaluate a string as if it were a variable
  1046.     prs  - parse a string for input to evl or evla.
  1047.                                                Native Function List   19
  1048.  
  1049.  
  1050.   Miscellaneous Functions:
  1051.  
  1052.     asc  - return the ascii integer value of a character
  1053.     pat  - expand a filename to fully qualified name
  1054.     exe  - execute a DOS program
  1055.     wait - delay for a specified number of milliseconds
  1056.     beep - beep the PC speaker
  1057.  
  1058.  
  1059.   Object Functions:
  1060.  
  1061.     obj     - add functions and variables to an object
  1062.     objnew  - create a new object and establish object ancestry
  1063.     objdes  - destroy an object
  1064.     objsav  - save an object
  1065.     objnam  - rename an object
  1066.     objeve  - change the current event object
  1067.     objpar  - change the ancestry of an object
  1068.     objdsk  - evaluate macro language source or compiled code in a file
  1069.  
  1070.     qobj    - test for the existence of an object
  1071.     qobjsiz - return the size of an object (variables and functions)
  1072.     qobjexe - return the current object
  1073.     qobjeve - return the current event object
  1074.     qobjanc - test for the ancestry of an object
  1075.  
  1076.  
  1077.   Disk and File Functions:
  1078.  
  1079.     dskdel  - delete a file
  1080.     dskren  - rename a file
  1081.     dskloc  - search for a file in multiple directories
  1082.     dskfin  - search for a string in a file
  1083.     dskcpy  - copy a file
  1084.     dskcur  - change the current disk drive and/or path
  1085.     dskdir  - create a directory
  1086.     dsktch  - touch a file
  1087.     dskatt  - change file attributes
  1088.     dskopn  - open a file for reading or writing
  1089.     dskcls  - close a file
  1090.     dskrea  - read characters from a file
  1091.     dskwri  - write characters to a file
  1092.     dskpos  - change the current position in an open file
  1093.  
  1094.     qdskatt - test if a file has specified attributes
  1095.     qdskpat - return the current drive/path or boot path
  1096.     qdskdrv - return available disk drives
  1097.     qdskcap - return disk drive capacity (total and used)
  1098.  
  1099.  
  1100.   System Functions:
  1101.  
  1102.     sysmem  - define maximum XMS/EMS memory
  1103.                                                Native Function List   20
  1104.  
  1105.  
  1106.     sysswp  - define swap files
  1107.     sysprt  - define printer settings
  1108.     syssnd  - enable or disable sound
  1109.  
  1110.     qsysver - return the current version of The Aurora Editor
  1111.     qsysos  - return the current version of the operating system (DOS)
  1112.     qsyspgm - return the name of The Aurora Editor .EXE file
  1113.     qsysvar - return the value of an environment variable
  1114.  
  1115.  
  1116.   Timer Functions:
  1117.  
  1118.     timdes  - destroy a timer
  1119.     timint  - create a interval timer
  1120.     timalm  - create an alarm timer
  1121.  
  1122.     qtim    - return the current time
  1123.  
  1124.  
  1125.   Keyboard Functions:
  1126.  
  1127.     kbdenh  - enable/disable enhanced keyboard
  1128.     kbdrpt  - define keyboard event reporting mode
  1129.     kbdclr  - clear keyboard buffer
  1130.  
  1131.     qkbdshf - return keyboard shift status
  1132.     qkbdchr - wait for a character to be entered and return it
  1133.  
  1134.  
  1135.   Mouse Functions:
  1136.  
  1137.     mouini  - open and initialize the mouse
  1138.     moutrm  - close the mouse
  1139.     mousen  - adjust mouse sensitivity
  1140.     mourpt  - define mouse event reporting mode
  1141.     moupos  - set the mouse position
  1142.     mouvis  - show/hide the mouse
  1143.  
  1144.     qmoupos - return the mouse x or y position
  1145.  
  1146.  
  1147.   Queue Functions:
  1148.  
  1149.     que       - post an event to the event queue
  1150.     send      - send event directly to the event object (bypass queue)
  1151.     queobj    - post an event to an object
  1152.     sendobj   - send an event directly to any object (bypass queue)
  1153.     quedis    - read and dispatch the next event from the event queue
  1154.     quesiz    - set the size of the event queue
  1155.     quequi    - force quedis to return null
  1156.                                                Native Function List   21
  1157.  
  1158.  
  1159.   Video Functions Functions:
  1160.  
  1161.     vidcsz    - set the visible cursor size
  1162.     vidbli    - set the video blink mode
  1163.     vidfon    - set the video mode
  1164.     vidorg    - set the mapping of the virtual to physical screen
  1165.     vidpri    - print a string on the screen
  1166.     vidbor    - set the color of the screen overscan border
  1167.     vidoff    - turn video off
  1168.     vidon     - turn video on
  1169.  
  1170.     qvidmon   - test for monochrome
  1171.     qvidp     - return video info (mapping, size, and blink mode)
  1172.  
  1173.  
  1174.   Text Buffer Functions:
  1175.  
  1176.     texdra   - redraw all windows displaying the specified text buffer
  1177.     texcre   - create a new text buffer
  1178.     texmen   - create a menu text buffer
  1179.     texdes   - destroy a text buffer
  1180.     texloa   - create a text buffer from a file or directory on disk
  1181.     texnam   - rename a text buffer
  1182.     textop   - make a text buffer the current default text buffer
  1183.     texdty   - set or clear the text buffer dirty flag
  1184.     texdlm   - set text buffer line delimiter or binary line length
  1185.     texusz   - set text buffer undo/redo stack size
  1186.  
  1187.     texovl   - overlay a string at an [x,y] position in a text buffer
  1188.     texinsx  - insert a string at an [x,y] position in a text buffer
  1189.     texdelx  - delete a string at an [x,y] position in a text buffer
  1190.     texinsy  - insert one or more strings as lines in a text buffer
  1191.     texdely  - delete one or more lines in a text buffer
  1192.  
  1193.     qtex     - test for the existence of a text buffer
  1194.     qtexlin  - return a portion of a line in a text buffer
  1195.     qtexend  - return the number of lines in text buffer
  1196.     qtexpre  - return the previous text buffer in the text buffer list
  1197.     qtexdty  - return the value of the dirty flag
  1198.     qtextru  - return the value of the truncate flag
  1199.     qtexlen  - return the length of a line
  1200.     qtexbeg  - return the position of the first non-blank char in a line
  1201.     qtexfld  - return info about a text fold
  1202.     qtextop  - return the default text buffer
  1203.     qtexmrk  - return info about marks associated with a text buffer
  1204.  
  1205.     qtexbin  - return text buffer binary line length
  1206.     qtexmen  - return info about a menu text buffer
  1207.     qtexdir  - return info about a directory listing from texloa
  1208.                                                Native Function List   22
  1209.  
  1210.  
  1211.     undbeg   - start saving undo/redo information for a text buffer
  1212.     undend   - stop saving undo/redo information for a text buffer
  1213.     und      - undo or redo last text buffer change
  1214.  
  1215.  
  1216.   Mark Functions:
  1217.  
  1218.     mrkset  - create a new mark or modify an existing mark
  1219.     mrkdes  - destroy a mark
  1220.     mrknam  - rename a mark
  1221.     mrktop  - make a cursor mark the default mark
  1222.     mrkcol  - change the color of a mark
  1223.  
  1224.     mrkdel  - delete the text within a mark
  1225.     mrkins  - copy the text within a mark at a new location
  1226.     mrkmov  - move the text within a mark to a new location
  1227.     mrkovl  - overlay the text within a mark at a new location
  1228.  
  1229.     mrkshf  - shift the text within a mark left or right
  1230.  
  1231.     mrkfil  - fill a mark with a character
  1232.     mrkcas  - change the case of the text within a mark
  1233.     mrkjus  - justify the text within a mark (left, right, center)
  1234.     mrksrt  - sort the text within a mark
  1235.     mrktab  - expand the tab characters within a mark
  1236.  
  1237.     mrkrfl  - reflow the text within a mark
  1238.     mrksav  - save or print the text within a mark
  1239.     mrkfin  - search for and optionally replace text within a mark
  1240.     mrkrel  - relocate a mark to a new position or text buffer
  1241.     mrkfld  - create new text folds or remove existing text folds
  1242.  
  1243.     qmrk    - test for the existence of a mark
  1244.     qmrkpre - return the previous mark in the text buffer mark list
  1245.     qmrktex - return the text buffer name associated with a mark
  1246.     qmrkp   - return the mark coordinates, width, or height
  1247.     qmrkcol - return the column position of a mark (cursor marks)
  1248.     qmrklin - return the first line number of a mark (cursor marks)
  1249.     qmrkins - return the insert/overlay state of a mark (cursor marks)
  1250.     qmrktyp - return the type of mark
  1251.     qmrkbuf - return the contents of a column mark
  1252.     qmrkwin - return the window associated with a cursor mark
  1253.  
  1254.  
  1255.   Window Functions:
  1256.  
  1257.     windra  - redraw specified portion of a window
  1258.     winset  - create, hide, or show a window
  1259.                                                Native Function List   23
  1260.  
  1261.  
  1262.     windes  - destroy a window
  1263.     winnam  - rename a window
  1264.     winttl  - change a window title
  1265.     wineot  - change the window end-of-text line
  1266.     winmen  - set the menu bar for a window
  1267.     winmeh  - highlight a menu bar item for a window
  1268.     wintic  - set the title bar controls for a window
  1269.     winmrk  - set the cursor mark for a window
  1270.     winpar  - set the window parent
  1271.     winnex  - alter the placement of the window in the window list
  1272.     winpre  - alter the placement of the window in the window list
  1273.     winvib  - create a local video buffer for a window
  1274.  
  1275.     wincol  - set the window colors
  1276.     winbor  - set the window borders
  1277.     winfra  - set the window frame components
  1278.     winshd  - set the window shadow
  1279.     winsh2  - set the window shadow for dialog controls
  1280.  
  1281.     winscr  - scroll the contents of a window
  1282.     winadj  - scroll the contents of a window without moving cursor
  1283.     winbar  - set a window scroll bar thumb position
  1284.     winsiz  - resize a window
  1285.     winmov  - move a window
  1286.     wintil  - tile windows on the screen
  1287.  
  1288.     qwin    - test for the existence of a window
  1289.     qwinmrk - return the cursor mark name associated with a window
  1290.     qwintex - return the name of the text buffer displayed in a window
  1291.     qwinx   - return the left-most column number displayed in a window
  1292.     qwiny   - return the top-most line number number displayed in a window
  1293.     qwintop - return the top window
  1294.     qwinbot - return the bottom window
  1295.     qwinpre - return the previous window in the window list
  1296.     qwinnex - return the next window in the window list
  1297.     qwinchi - return the first/last child window of a specified window
  1298.     qwinttl - return a window title string
  1299.     qwinpar - return the parent window of a specified window
  1300.     qwintit - return a window title or title highlight position
  1301.     qwincol - return the color of a window component
  1302.     qwinbor - return window border info
  1303.     qwinp   - return the window coordinates, height, or width
  1304.     qwinfra - return info about the window frame components
  1305.     qwinrgn - return the window regions at specified coordinates
  1306.     qwinbar - return the position of a scroll bar thumb
  1307.     qwincnt - return the number of windows or child windows
  1308.     qwinmen - return window menu bar info
  1309.     qwintic - return window title bar control info
  1310.                                           Native Functions - Detail   24
  1311.  
  1312.  
  1313.   3-1  Native Functions - In Detail
  1314.   ─────────────────────────────────
  1315.  
  1316.   The following sections describe each of the macro language native
  1317.   functions in detail. The functions are listed in the following format:
  1318.  
  1319.     functionname  [arg 1]  [arg 2]  [arg 3] ...
  1320.  
  1321.   The function name is listed first, followed by its arguments in
  1322.   brackets. The argument and return value "types" are not given, since
  1323.   they are always character strings.
  1324.  
  1325.   The "..." indicates that a variable number of arguments (similar to
  1326.   the previous arguments) may follow. Note that function arguments are
  1327.   always optional in The Aurora Macro Language. In many cases, the
  1328.   function will supply a default value if an argument is not specified,
  1329.   or a null value is specified.
  1330.  
  1331.   Many functions take an [options] character string as an argument. An
  1332.   option is just a one character code that tells the function to do
  1333.   something in a specific way. Each function may have its own set of
  1334.   options, each with their own meaning. In many cases, multiple options
  1335.   can be specified in the [options] character string. For example:
  1336.  
  1337.     fin s "b" %ir.   // the options "i" and "r" are passed to the
  1338.                      // function "fin"
  1339.  
  1340.   Some native function names may include a 3-character prefix (such as
  1341.   "obj", "tex", mrk", etc.) which indicates the "group" of related
  1342.   functions that the function belongs to. For example, "objnew" is an
  1343.   "object" function, "mrkset" is "mark" function, and "texcre" is a
  1344.   "text buffer" function. Within these function groups, functions whose
  1345.   only purpose is to return information are also prefixed by a "q"
  1346.   (query). For example, "qtexend" returns the number of lines in a text
  1347.   buffer.
  1348.  
  1349.   In functions which test for "true" or "false" (such as "if" or "and"),
  1350.   a value of null or "0" is false. Any other value is true.
  1351.  
  1352.   Remember, the following section describes "low-level" native
  1353.   functions. Many other "library" functions are available in The Aurora
  1354.   Editor (see "The Aurora Editor User's Guide"). Library functions are
  1355.   "built up" from native functions in The Aurora Macro Language, and are
  1356.   easier to use for most "high-level" editing operations.
  1357.                                                Definition Functions   25
  1358.  
  1359.  
  1360.   3-2  Definition Functions
  1361.   ─────────────────────────
  1362.  
  1363.   =  [var name]  [value].
  1364.  
  1365.     Assigns the value [value] to the local variable [var name]. The
  1366.     local variable is defined only within the current function
  1367.     definition. Returns 1 if success or null if failure.
  1368.  
  1369.  
  1370.   set  [obj var name]  [value].
  1371.  
  1372.     Assigns the value [value] to the object variable [obj var name]. The
  1373.     assignment remains in effect until another assignment is made to the
  1374.     same variable name, or the variable is destroyed or renamed with the
  1375.     "uns" or "ren" functions (see below). The variable will also be
  1376.     destroyed if the object containing the variable is destroyed.
  1377.     Returns 1 if success or null if failure.
  1378.  
  1379.  
  1380.   ren  [obj var name]  [new obj var name].
  1381.  
  1382.     Renames the object variable [obj var name] to [new obj var name].
  1383.     Only the name of the variable changes, not the value. Returns 1 if
  1384.     success or null if failure.
  1385.  
  1386.  
  1387.   uns  [obj var name].
  1388.  
  1389.     Destroys or "un-sets" the object variable [obj var name]. Both the
  1390.     variable name and value are removed from the object in which they
  1391.     are contained. Returns 1 if success or null if failure.
  1392.  
  1393.  
  1394.   fun  [function name]  [function body]  [arg 1]  [arg 2] ...
  1395.  
  1396.     Defines the function [function name] by assigning the macro language
  1397.     expression [function body] to the function [function name].
  1398.  
  1399.     [arg 1], [arg 2], etc. arg seldom used. They tell the macro language
  1400.     compiler which arguments are to be compiled whenever they are
  1401.     encountered in a call to [function name]. This can speed up
  1402.     performance when an argument to a [function name] is a string
  1403.     containing a macro language expression which is to be evaluated
  1404.     within [function name]. [arg 1], [arg 2], etc. are integers
  1405.     specifying the relative position of the argument to be compiled.
  1406.  
  1407.     This function returns 1 if success or null if failure.
  1408.                                                Definition Functions   26
  1409.  
  1410.  
  1411.   arg  [var name 1]  [var name 2] ...
  1412.  
  1413.     Names the arguments passed to the function in which it is contained.
  1414.     After this call, the arguments can be accessed by name.
  1415.  
  1416.  
  1417.   qarg  [argument number n].
  1418.  
  1419.     Returns the "nth" argument passed to the function in which it is
  1420.     contained. If n is zero or null, the number of arguments passed to
  1421.     the function is returned.
  1422.  
  1423.  
  1424.  
  1425.   3-3  Conditional Functions
  1426.   ──────────────────────────
  1427.  
  1428.   eq  [string 1]  [string 2] ...
  1429.  
  1430.     Returns 1 if [string 1] is equal to any one of the arguments which
  1431.     follow it, otherwise it returns null.
  1432.  
  1433.  
  1434.   eqi  [string 1]  [string 2] ...
  1435.  
  1436.     Returns 1 if [string 1] is equal (ignoring case) to any one of the
  1437.     arguments which follow it, otherwise it returns null.
  1438.  
  1439.  
  1440.   ne  [string 1]  [string 2] ...
  1441.  
  1442.     Returns 1 if [string 1] is not equal to any of the arguments which
  1443.     follow it, otherwise it returns null.
  1444.  
  1445.  
  1446.   ==  [string 1]  [string 2] ...
  1447.  
  1448.     Returns 1 if [string 1] is numerically equal to any one of the
  1449.     arguments which follow it, otherwise it returns null.
  1450.  
  1451.  
  1452.   !=  [string 1]  [string 2] ...
  1453.  
  1454.     Returns 1 if [string 1] is not numerically equal to any one of the
  1455.     arguments which follow it, otherwise it returns null.
  1456.  
  1457.  
  1458.   <  [string 1]  [string 2] ...
  1459.  
  1460.     Returns 1 if each argument is numerically less than the next
  1461.     argument, otherwise it returns null.
  1462.                                               Conditional Functions   27
  1463.  
  1464.  
  1465.   >  [string 1]  [string 2] ...
  1466.  
  1467.     Returns 1 if each argument is numerically greater than the next
  1468.     argument, otherwise it returns null.
  1469.  
  1470.  
  1471.   <=  [string 1]  [string 2] ...
  1472.  
  1473.     Returns 1 if each argument is numerically less than or equal to the
  1474.     next argument, otherwise it returns null.
  1475.  
  1476.  
  1477.   >=  [string 1]  [string 2] ...
  1478.  
  1479.     Returns 1 if each argument is numerically greater than or equal to
  1480.     the next argument, otherwise it returns null.
  1481.  
  1482.  
  1483.  
  1484.   3-4  Logical Functions
  1485.   ──────────────────────
  1486.  
  1487.   and  [string 1]  [string 2] ...
  1488.  
  1489.     Evaluates all arguments until an argument returns "0" or null, in
  1490.     which case it returns null, otherwise it returns 1.
  1491.  
  1492.  
  1493.   or  [string 1]  [string 2] ...
  1494.  
  1495.     Evaluates all arguments until an argument does not return "0" or
  1496.     null, in which case it returns 1, otherwise it returns null.
  1497.  
  1498.  
  1499.   !  [string 1]  [string 2] ...
  1500.  
  1501.     Returns 1 if all arguments are either "0" or null, otherwise it
  1502.     returns null.
  1503.  
  1504.  
  1505.  
  1506.   3-5  Bitwise Logical Functions
  1507.   ──────────────────────────────
  1508.  
  1509.   &  [string 1]  [string 2].
  1510.  
  1511.     Returns [string 1] "and-ed bitwise" with [string 2].
  1512.                                           Bitwise Logical Functions   28
  1513.  
  1514.  
  1515.   |  [string 1]  [string 2].
  1516.  
  1517.     Returns [string 1] "or-ed bitwise" with [string 2].
  1518.  
  1519.  
  1520.   ^  [string 1]  [string 2].
  1521.  
  1522.     Returns [string 1] "xor-ed bitwise" with [string 2].
  1523.  
  1524.  
  1525.  
  1526.   3-6  Control Functions
  1527.   ──────────────────────
  1528.  
  1529.   if  [condition]  [then body]  [else body].
  1530.  
  1531.     Evaluates the expression [condition]. If it is not "0" or null, then
  1532.     the expression [then body] is evaluated, otherwise the expression
  1533.     [else body] is evaluated. Returns the value of the evaluated
  1534.     expression.
  1535.  
  1536.  
  1537.   while  [condition]  [while body].
  1538.  
  1539.     Evaluates the expression [while body] while the expression
  1540.     [condition] does not evaluate to "0" or null. [condition] is
  1541.     evaluated before the first evaluation of [while body]. Returns null.
  1542.  
  1543.  
  1544.   dowhile  [while body]  [condition].
  1545.  
  1546.     Evaluates the expression [while body] while the expression
  1547.     [condition] does not evaluate to "0" or null. [condition] is
  1548.     evaluated after the first evaluation of [while body]. Returns null.
  1549.  
  1550.  
  1551.  
  1552.   3-7  Arithmetic Functions
  1553.   ─────────────────────────
  1554.  
  1555.   +  [integer 1]  [integer 2] ...
  1556.  
  1557.     Returns the numeric sum of all arguments.
  1558.  
  1559.  
  1560.   -  [integer 1]  [integer 2] ...
  1561.  
  1562.     If only one argument is specified, this function returns the numeric
  1563.     negative of the argument, otherwise it returns the result of
  1564.     subtracting all arguments after the first argument, from the first
  1565.     argument.
  1566.                                                Arithmetic Functions   29
  1567.  
  1568.  
  1569.   *  [integer 1]  [integer 2] ...
  1570.  
  1571.     Returns the numeric product of all arguments.
  1572.  
  1573.  
  1574.   /  [integer 1]  [integer 2] ...
  1575.  
  1576.     Returns the result of dividing the first argument by all arguments
  1577.     after the first argument.
  1578.  
  1579.  
  1580.   mod  [integer 1]  [integer 2]
  1581.  
  1582.     Returns the modulus of dividing the first argument by the second
  1583.     argument.
  1584.  
  1585.  
  1586.   3-8  String Functions
  1587.   ─────────────────────
  1588.  
  1589.   cat  [string 1]  [string 2] ...
  1590.  
  1591.     Returns the concatenated string of all arguments. For example:
  1592.  
  1593.       cat "abc" "123" %xyz.        // returns "abc123xyz"
  1594.       cat "var" (+ 1 2).           // returns "var3"
  1595.  
  1596.  
  1597.   sub  [string]  [position]  [length].
  1598.  
  1599.     Returns the substring of [string] starting at character position
  1600.     [position] and extending for a length of [length] characters. If
  1601.     [length] is zero or not specified, then the length used is the
  1602.     length from position to the end of [string]. For example:
  1603.  
  1604.       sub "Aurora" 3.             // returns "rora"
  1605.       sub "Aurora" 3 2.           // returns "ro"
  1606.  
  1607.  
  1608.   fin  [string]  [search string]  [options]  [replace string].
  1609.  
  1610.     Searches for [search string] within [string]. Any combination of the
  1611.     following [options] may be specified:
  1612.  
  1613.       i - case insensitive search
  1614.       r - search in "reverse", starting from the end of the string
  1615.       w - search for "whole words" only
  1616.  
  1617.     If [replace string] is not specified, this function returns the
  1618.     character position where [search string] was found in [string]
  1619.     (returns "0" if not found).
  1620.                                                    String Functions   30
  1621.  
  1622.  
  1623.     If [replace string] is specified, this function returns a string
  1624.     where every occurrence of [search string] has been replaced with
  1625.     [replace string].
  1626.  
  1627.     Examples:
  1628.  
  1629.       fin "Aurora" %r.            // returns "3"
  1630.       fin "Aurora" %R %ri.        // returns "5"
  1631.       fin "Aurora" %r @ %XYZ.     // returns "AuXYZoXYZa"
  1632.       fin "Aurora" %k.            // returns "0"
  1633.  
  1634.  
  1635.   siz  [string 1]  [string 2] ...
  1636.  
  1637.     Returns the sum of the string lengths of all of its arguments.
  1638.     For example:
  1639.  
  1640.       siz "Aurora".               // returns "6"
  1641.       siz "xyz" %abc %Z.          // returns "7"
  1642.  
  1643.  
  1644.   dup  [size]  [fill string].
  1645.  
  1646.     Returns a string of length [size]. If [fill string] is specified,
  1647.     the string is filled by duplicating [fill string] enough times to
  1648.     fill the string. For example:
  1649.  
  1650.       dup 10 "abc".    returns "abcabcabca"
  1651.  
  1652.     If [fill string] is not specified, the contents of the return string
  1653.     are undefined. Returns null if failure.
  1654.  
  1655.  
  1656.   wrd  [char set].
  1657.  
  1658.     Sets the default character set for defining a "word" for the "whole
  1659.     words" only search option. The "whole words" only search option is
  1660.     used by the "fin" and "mrkfin" functions. [char set] is a string
  1661.     composed of all the characters in the character set. Character
  1662.     ranges can be indicated with a hyphen (-). For example:
  1663.  
  1664.       wrd "abcA-Z0".
  1665.  
  1666.     The example above sets the default character set to the characters
  1667.     a, b, c, 0, and the characters A through Z.
  1668.  
  1669.  
  1670.   idx  [string 1]  [string 2].
  1671.  
  1672.     Returns the position in [string 1] of the first character contained
  1673.     in [string 2]. Returns null if none are found. For example:
  1674.                                                    String Functions   31
  1675.  
  1676.  
  1677.       idx "abcde" %b.             // returns "2"
  1678.       idx "abcde" %tdv.           // returns "4"
  1679.       idx "abcde" %xyz.           // returns null
  1680.  
  1681.  
  1682.   vfy  [string 1]  [string 2].
  1683.  
  1684.     Returns the position in [string 1] of the first character not
  1685.     contained in [string 2]. Character ranges such as "a-zA-Z0-9" can be
  1686.     specified for [string 2]. Returns null if all characters in [string
  1687.     1] are contained in [string 2]. For example:
  1688.  
  1689.       vfy "Aurora" "auro".        // returns null
  1690.       vfy "Aurora" "aur".         // returns "4"
  1691.       vfy "Aurora" %a.            // returns "2"
  1692.  
  1693.  
  1694.   chc  [string]  [options].
  1695.  
  1696.     Changes the case of [string] and returns the result. The following
  1697.     [options] may be specified:
  1698.  
  1699.       l - change all characters to lower case
  1700.       u - change all characters to upper case
  1701.  
  1702.     If no options are specified, "u" is assumed. If options "u" and "l"
  1703.     are both specified, the case of each character in the string is
  1704.     toggled or "flipped". For example:
  1705.  
  1706.       chc "Aurora".               // returns "AURORA"
  1707.       chc "Aurora" %l.            // returns "aurora"
  1708.       chc "Aurora" %ul.           // returns "aURORA"
  1709.  
  1710.  
  1711.   byte  [integer 1]  [integer 2] ...
  1712.  
  1713.     Converts each integer argument to a string of length 1 (a 1-byte
  1714.     binary number) and returns the concatenated result. For example:
  1715.  
  1716.       byte 32 32 20h.
  1717.  
  1718.     The example above returns a string of 3 blanks.
  1719.  
  1720.  
  1721.   word  [integer 1]  [integer 2] ...
  1722.  
  1723.     Converts each integer argument to a string of length 2 (a 2-byte
  1724.     binary number) and returns the concatenated result.
  1725.  
  1726.  
  1727.   long  [integer 1]  [integer 2] ...
  1728.  
  1729.     Converts each integer argument to a string of length 4 (a 4-byte
  1730.     binary number) and returns the concatenated result.
  1731.                                Evaluation and Compilation Functions   32
  1732.  
  1733.  
  1734.   hex  [string 1]  [string 2] ...
  1735.  
  1736.     Converts every two hex characters in each argument string to 1
  1737.     character and returns the concatenated result. For example:
  1738.  
  1739.       hex "202020" "2020".
  1740.  
  1741.     The example above returns a string of 5 blanks.
  1742.  
  1743.  
  1744.   toh  [string 1]  [string 2] ...
  1745.  
  1746.     Converts every character in each argument string to 2 hex characters
  1747.     and returns the concatenated result. For example:
  1748.  
  1749.       toh "ABC" "12".
  1750.  
  1751.     The example above returns the string "4142433132".
  1752.  
  1753.  
  1754.   3-9  Evaluation and Compilation Functions
  1755.   ─────────────────────────────────────────
  1756.  
  1757.  
  1758.   evl   [expression]  [reps].
  1759.   evla  [expression]  [reps].
  1760.  
  1761.     These functions evaluate [expression] for [reps] number of times.
  1762.     [reps] defaults to "1" if not specified. These functions return the
  1763.     result of the last evaluation of [expression].
  1764.  
  1765.     The function "evla" evaluates [expression] as if it were an argument
  1766.     to a function, whereas "evl" evaluates [expression] as a macro
  1767.     language sentence.
  1768.  
  1769.     Note that [expression] is not "parsed" before it is evaluated. If
  1770.     [expression] must be parsed, use the "prs" function first. For
  1771.     example:
  1772.  
  1773.       = %e "beep    100    100".
  1774.       evl (prs e).
  1775.  
  1776.     The example above parses the value of the variable "e", evaluates it
  1777.     as a macro language sentence, and beeps the PC speaker.
  1778.  
  1779.  
  1780.   comf  [source file]  [compiled file].
  1781.  
  1782.     Compiles the macro language source code in the file [source file]
  1783.     and places the compiled code in the file [compiled file]. If
  1784.     [compiled file] already exists, then it is overwritten. Returns 1 if
  1785.     success, or null if failure.
  1786.                                Evaluation and Compilation Functions   33
  1787.  
  1788.  
  1789.   #get  [source or compiled file].
  1790.  
  1791.     Includes the specified macro language source or compiled file into
  1792.     the current macro source code when it is evaluated or compiled.
  1793.  
  1794.  
  1795.   var  [string].
  1796.  
  1797.     Evaluates [string] as a variable and returns the value of the
  1798.     variable. For example:
  1799.  
  1800.       var (cat "xy" "z").
  1801.  
  1802.     The example above returns the value of the variable "xyz".
  1803.  
  1804.  
  1805.   prs  [expression].
  1806.  
  1807.     Parses the macro language expression [expression] and returns the
  1808.     result. Parsing will remove comments and insignificant spaces from
  1809.     the expression.
  1810.  
  1811.     Parsing is normally done automatically by the "objdsk" function when
  1812.     source code is loaded and executed, or by the "comf" function when
  1813.     source code is compiled. However, if a string is constructed and
  1814.     evaluated while a macro language program is executing, it should
  1815.     first be parsed before being evaluated by the "evl" function. For
  1816.     example:
  1817.  
  1818.       prs "beep  100     100. // beep the speaker".
  1819.  
  1820.     The example above returns the string "beep 100 100", which can be
  1821.     then be evaluated by the "evl" function.
  1822.  
  1823.  
  1824.   3-10  Miscellaneous Functions
  1825.   ─────────────────────────────
  1826.  
  1827.   asc  [string].
  1828.  
  1829.     Returns the integer ascii value of the first character in [string].
  1830.     For example:
  1831.  
  1832.       asc "A".                         // returns "65"
  1833.  
  1834.  
  1835.   pat  [filename]  [filename2/path].
  1836.  
  1837.     Expands [filename] to a fully qualified filename if it is not fully
  1838.     qualified or ambiguous. The second argument [filename2/path] is used
  1839.     as the "template" to construct the fully qualified name. If
  1840.     [filename2/path] is not specified, then the current drive and
  1841.     directory are used as the template. For example:
  1842.  
  1843.       pat "xyz.c" "d:\a\*.*".         // returns "d:\a\xyz.c".
  1844.                                             Miscellaneous Functions   34
  1845.  
  1846.  
  1847.   exe  [command]  [options]  [memory].
  1848.  
  1849.     Executes the DOS command [command]. The string [command] is the DOS
  1850.     program name (.EXE or .COM file) and parameters exactly as you would
  1851.     type them on the DOS command line. The following [options] may be
  1852.     specified:
  1853.  
  1854.       k  - prompts the user to return when the command is completed
  1855.       c  - clears the screen before the command begins and restores
  1856.            the screen after the command is completed
  1857.  
  1858.  
  1859.     [memory] specifies the amount of memory (in k) to request from DOS
  1860.     for the program. If [memory] is -1, then the maximum available
  1861.     memory will be used. The interpreter may swap to XMS memory, EMS
  1862.     memory, or disk to satisfy this request.
  1863.  
  1864.     Note: If option "k" is specified, then option "c" is used
  1865.     internally, whether or not it is specified in the function call.
  1866.  
  1867.  
  1868.   wait  [milliseconds].
  1869.  
  1870.     Delays execution for the time period specified by [milliseconds].
  1871.  
  1872.  
  1873.   beep  [frequency]  [duration].
  1874.  
  1875.     "Beeps" the PC speaker for the specified frequency and duration. If
  1876.     [duration] is omitted or zero, the speaker sounds at the specified
  1877.     frequency until "beep" is called again with no arguments.
  1878.     [frequency] is in herz and [duration] is in milliseconds.
  1879.  
  1880.  
  1881.   3-11  Object Functions
  1882.   ──────────────────────
  1883.  
  1884.   Object functions are used to manipulate and return information about
  1885.   macro language objects. Objects can be used to logically group
  1886.   together related functions and variables. There are functions for
  1887.   creating and destroying objects, setting and querying an object's
  1888.   ancestry, and changing the current "event" handling object. Also, the
  1889.   "objdsk" function can evaluate macro code in a file on disk. Object
  1890.   function names use the prefix "obj".
  1891.  
  1892.  
  1893.   objnew  [obj name]  [estimated size]  [obj 1]  [obj 2] ...
  1894.  
  1895.     Creates a new object [obj name], and optionally establishes the
  1896.     ancestry of the object. [estimated size] is the estimated number of
  1897.     variables and functions which you believe the object may contain,
  1898.     and is used to optimize internal tables. [obj 1], [obj 2], etc are
  1899.     optional "ancestor" objects from which [obj name] may "inherit"
  1900.     functions and variable assignments. Returns 1 if success or null if
  1901.     failure.
  1902.                                                    Object Functions   35
  1903.  
  1904.  
  1905.   obj  [obj name]  [obj body].
  1906.  
  1907.     Adds functions and variables to the object [obj name]. When [obj
  1908.     body] is evaluated, any function definitions or object variable
  1909.     assignments within [obj body] are added to the object [obj name].
  1910.  
  1911.  
  1912.   objdes  [obj name].
  1913.  
  1914.     Destroys the object [obj name]. The object [obj name] is also
  1915.     removed from the inheritance path of other objects, if applicable.
  1916.  
  1917.  
  1918.   objsav  [obj name]  [filename]  [options].
  1919.  
  1920.     Saves the object [obj name] in the file [filename] as a compiled
  1921.     sequence of "set" function calls. The "objdsk" function can be used
  1922.     to reload the object from disk. The following options may be
  1923.     specified:
  1924.  
  1925.       a - append to the end of [filename]
  1926.  
  1927.     Returns 1 if success or null if failure.
  1928.  
  1929.  
  1930.   objnam  [obj name]  [new obj name].
  1931.  
  1932.     Renames the object [obj name] to [new obj name]. Returns 1 if
  1933.     success or null if failure.
  1934.  
  1935.  
  1936.   objeve  [obj name].
  1937.  
  1938.     Makes the object [obj name] the current "event" object. The event
  1939.     object is where the interpreter looks for event handler functions
  1940.     when dispatching events from the internal event queue.
  1941.  
  1942.  
  1943.   objpar  [obj name]  [obj 1]  [obj 2] ...
  1944.  
  1945.     Changes the "inheritance path" or ancestry of the object [obj name]
  1946.     to [obj 1], [obj 2], etc.
  1947.  
  1948.  
  1949.   objdsk  [obj name]  [filename]  [arg 1]  [arg 2] ...
  1950.  
  1951.     Evaluates the macro language source or compiled code in [filename],
  1952.     with the object [obj name] as the default object. [arg 1], [arg 2],
  1953.     etc. are arguments passed to the macro code in [filename]. This
  1954.     function returns the value of the last sentence evaluated in
  1955.     [filename].
  1956.                                                    Object Functions   36
  1957.  
  1958.  
  1959.   qobj  [obj name].
  1960.  
  1961.     Returns 1 if the object [obj name] exists, otherwise it returns
  1962.     null.
  1963.  
  1964.  
  1965.   qobjsiz  [obj name].
  1966.  
  1967.     Returns the number of functions and variables in the object [obj
  1968.     name].
  1969.  
  1970.  
  1971.   qobjexe.
  1972.  
  1973.     Returns the name of the currently executing or "default" object.
  1974.  
  1975.  
  1976.   qobjeve.
  1977.  
  1978.     Returns the name of the current "event" object.
  1979.  
  1980.  
  1981.   qobjanc  [obj name]  [obj 2].
  1982.  
  1983.     Returns 1 if the object [obj name] has the object [obj 2] as an
  1984.     ancestor object in its inheritance path, or if [obj name] equals
  1985.     [obj 2], otherwise it returns null.
  1986.  
  1987.  
  1988.   3-12  Disk Functions
  1989.   ────────────────────
  1990.  
  1991.   Disk functions are used to manipulate files on disk, and to return
  1992.   path and drive information. Disk function names use the prefix "dsk".
  1993.  
  1994.  
  1995.   dskdel  [filename]  [options].
  1996.  
  1997.     Deletes the file [filename] and returns 1 if success, or null if
  1998.     failure. Empty directories can also be deleted if option "d" is
  1999.     specified.
  2000.  
  2001.  
  2002.   dskren  [filename]  [new filename].
  2003.  
  2004.     Renames the file [filename] to [new filename]. Returns 1 if success,
  2005.     or null if failure.
  2006.  
  2007.  
  2008.   dskloc  [filename]  [path].
  2009.  
  2010.     Searches the path string [path] for the file [filename]. [path] can
  2011.     be a sequence of paths separated by semicolons (;) (as in the DOS
  2012.     "PATH" environment string). This function returns the fully
  2013.     qualified filename if found, otherwise it returns null.
  2014.                                                      Disk Functions   37
  2015.  
  2016.  
  2017.   dskfin  [filename]  [string]  [options].
  2018.  
  2019.     Searches for the string [string] in the file [filename]. The
  2020.     following search [options] can be specified:
  2021.  
  2022.       i - case insensitive search
  2023.       w - search for "whole words" only
  2024.  
  2025.     This function returns the position in the file where the string was
  2026.     found ("1" is the first position), or null if not found. If the
  2027.     search was interrupted via <Ctrl-Break>, this function returns -1.
  2028.  
  2029.  
  2030.   dskcpy  [source filename]  [dest filename]  [options].
  2031.  
  2032.     Copies the file [source filename] to [dest filename]. The following
  2033.     [options] may be specified:
  2034.  
  2035.       a - append the source file to the destination file
  2036.       k - the destination file will keep the source file date/time
  2037.  
  2038.     This function returns non-zero if successful, otherwise it returns
  2039.     null.
  2040.  
  2041.  
  2042.   dskcur  [path]  [options].
  2043.  
  2044.     Sets the current drive or the current path for the specified drive.
  2045.     The following [options] can be specified:
  2046.  
  2047.       d - set the current drive
  2048.       p - set the current path
  2049.  
  2050.     For example:
  2051.  
  2052.       dskcur "d:" %d.       // set current drive to "d:"
  2053.       dskcur "c:\xyz" %p.   // set current directory for "c:" to "xyz"
  2054.       dskcur "c:\xyz" %dp.  // set current drive and directory
  2055.  
  2056.     Returns 1 if success or null if failure.
  2057.  
  2058.  
  2059.   dskdir  [path].
  2060.  
  2061.     Creates the new directory specified by [path]. All elements of the
  2062.     path must exist (except the last element). Returns 1 if success or
  2063.     null if failure.
  2064.                                                      Disk Functions   38
  2065.  
  2066.  
  2067.   dsktch  [filename].
  2068.  
  2069.     "Touches" the file [filename] by setting the file's date and time to
  2070.     the current date and time. Returns 1 if success or null if failure.
  2071.  
  2072.  
  2073.   dskatt  [filename]  [attributes].
  2074.  
  2075.     Changes the attributes of the file [filename] to [attributes]. The
  2076.     attributes of a directory can also be changed. [attributes] may be
  2077.     any combination of the following:
  2078.  
  2079.       r - read only
  2080.       h - hidden
  2081.       s - system
  2082.       a - archive
  2083.  
  2084.     Returns 1 if success or null if failure.
  2085.  
  2086.  
  2087.   dskopn  [filename]  [options].
  2088.  
  2089.     Opens the file [filename] for reading and writing, and returns a
  2090.     "file handle" for use by the "dskrea", "dskwri", "dskpos", and
  2091.     "dskcls" functions (see below). The "current position" in the open
  2092.     file is at the first character in the file. The following [options]
  2093.     can be specified:
  2094.  
  2095.       c - create a new file or truncate the file if it already exists
  2096.       r - open the file for reading only
  2097.       w - open the file for reading and writing
  2098.  
  2099.     This function returns null if failure.
  2100.  
  2101.  
  2102.   dskcls  [file handle].
  2103.  
  2104.     Closes the file opened by the "dskopn" function above.
  2105.  
  2106.  
  2107.   dskrea  [file handle]  [length].
  2108.  
  2109.     Reads data from the current position in the open file specified by
  2110.     [file handle]. [length] specifies the number of characters to read,
  2111.     and may not exceed 16000. The current position in the file is
  2112.     advanced by the amount of characters actually read.
  2113.                                                      Disk Functions   39
  2114.  
  2115.  
  2116.     This function returns a string composed of the data read from the
  2117.     file, or null if failure. The amount of characters actually read
  2118.     from the file can be determined by using the "siz" function with the
  2119.     return string.
  2120.  
  2121.  
  2122.   dskwri  [file handle]  [string]  [options].
  2123.  
  2124.     Writes the string [string] at the current position in the open file
  2125.     specified by [file handle]. The current position in the file is
  2126.     advanced by the amount of characters actually written. If [option]
  2127.     "k" is specified, the file's date and time are not modified.
  2128.  
  2129.     This function returns the amount of characters written, or null if
  2130.     failure.
  2131.  
  2132.  
  2133.   dskpos  [file handle]  [offset]  [options].
  2134.  
  2135.     Changes the current position in the open file specified by [file
  2136.     handle]. The new position depends on the value of [offset] and
  2137.     [options]. The following [options] may be specified:
  2138.  
  2139.       a - [offset] specifies an absolute position in the file ("1" is
  2140.           the first position).
  2141.       c - [offset] specifies an offset from the current position.
  2142.       e - [offset] specifies an offset from the end of the file.
  2143.  
  2144.     If no [options] are specified, then "a" is assumed. This function
  2145.     returns the new absolute position in the file ("1" is the first
  2146.     position).
  2147.  
  2148.  
  2149.   qdskatt  [filename]  [attributes]
  2150.  
  2151.     Tests whether or not [filename] has the specified attributes. Any
  2152.     combination of the following [attributes] can be specified:
  2153.  
  2154.       a - archive
  2155.       d - directory
  2156.       h - hidden
  2157.       r - read only
  2158.       s - system
  2159.       v - volume
  2160.  
  2161.     This function returns a non-null value if the specified attributes
  2162.     are present, or null if none are present.
  2163.                                                      Disk Functions   40
  2164.  
  2165.  
  2166.   qdskpat  [options].
  2167.  
  2168.     Returns the fully qualified boot path or the current path. The
  2169.     following [options] may be specified:
  2170.  
  2171.       b - return the boot path where the interpreter was invoked
  2172.       c - return the current path
  2173.  
  2174.     If no options are specified, the default is "c".
  2175.  
  2176.  
  2177.   qdskdrv  [options].
  2178.  
  2179.     Returns a string consisting of all available disk drive letters.
  2180.     The following [options] may be specified:
  2181.  
  2182.       t - include network information. "1" after the drive letter
  2183.           indicates a local drive, "2" indicates a network drive.
  2184.  
  2185.     For example, for a computer system with 3 logical hard drives, 2
  2186.     floppies, and network drives F and G:
  2187.  
  2188.       qdskdrv.      // returns "ABCDEFG"
  2189.       qdskdrv %t.   // returns "A1B1C1D1E1F2G2"
  2190.  
  2191.  
  2192.   qdskcap  [drive]  [options].
  2193.  
  2194.     Returns the total or free amount of disk space available on disk
  2195.     drive [drive], in bytes. The following options may be specified.
  2196.  
  2197.       c - return the total capacity of the drive
  2198.       f - return the free space on the drive
  2199.  
  2200.     If no drive is specified, the current drive is assumed. If no
  2201.     options are specified, the default is "c".
  2202.                                                    System Functions   41
  2203.  
  2204.  
  2205.   3-13  System Functions
  2206.   ──────────────────────
  2207.  
  2208.   System functions are used to control and provide information about the
  2209.   interpreter's operating environment. There are functions to control
  2210.   the interpreter's use of memory and printer devices, and functions to
  2211.   return information such as environment strings and version numbers.
  2212.   System function names use the prefix "sys".
  2213.  
  2214.  
  2215.   sysmem  [options]  [limit].
  2216.  
  2217.     Allows the use of XMS or EMS memory. [limit] is the maximum amount
  2218.     of XMS or EMS to use, in k (a value 0 or -1 indicates that the
  2219.     maximum available amount should be used). One of the following
  2220.     [options] may be specified:
  2221.  
  2222.       e - use EMS memory
  2223.       x - use XMS memory
  2224.  
  2225.     To use both XMS and EMS memory, this function must be called twice.
  2226.     Note that an XMS or EMS driver must be installed before this
  2227.     function can be called successfully. This function returns a
  2228.     non-zero value if success, otherwise it returns null.
  2229.  
  2230.   sysswp  [swap file 1]  [swap file 2]  [swap file 3].
  2231.  
  2232.     Sets the swap files names for the interpreter to use in low memory
  2233.     situations. The interpreter will use [swap file 2] only when there
  2234.     is no more room on the drive containing [swap file 1], and [swap
  2235.     file 3] only when there is no more room on the drive containing
  2236.     [swap file 2]. All swap files should be on different drives. Returns
  2237.     non-zero if success or null if failure.
  2238.  
  2239.     EMS and XMS memory (if available) will be used before the swap
  2240.     files.
  2241.  
  2242.  
  2243.   sysprt  [id]  [options]  [page size]  [left margin]  [top margin]
  2244.           [right margin]  [bottom margin]  [line spacing]  [copies].
  2245.  
  2246.     Sets the current printer settings. The following printer settings
  2247.     can be specified:
  2248.  
  2249.     - [id]
  2250.  
  2251.       not used (reserved for future use).
  2252.                                                    System Functions   42
  2253.  
  2254.  
  2255.     - [page size]
  2256.  
  2257.       Specifies the "Lines per Page" of printed output. This includes
  2258.       the [top margin] and [bottom margin]. After the specified lines
  2259.       per page have been printed, a formfeed character (ascii 12) will
  2260.       be sent to the printer and a new page will be started.
  2261.  
  2262.       If PrtPag is zero, printing will be continuous (no formfeed
  2263.       characters will be sent to the printer). [top margin], [bottom
  2264.       margin], and the "page number" option will be ignored.
  2265.  
  2266.     - [line spacing]
  2267.  
  2268.       Specifies the number of lines to advance after printing each line
  2269.       of output. A value of 1 generates single-spaced output, 2
  2270.       generates double-spaced output, and so on.
  2271.  
  2272.     - [copies]
  2273.  
  2274.       Specifies the number of copies to print.
  2275.  
  2276.     - [top margin]
  2277.  
  2278.       Specifies the number of blank lines to precede the printed output
  2279.       at the top of each page. This value is included in [page size].
  2280.       [top margin] is ignored if [page size] is set to zero.
  2281.  
  2282.     - [bottom margin]
  2283.  
  2284.       Specifies the number of blank lines to follow the printed output
  2285.       at the bottom of each page. This value is included in [page size].
  2286.       [bottom margin] is ignored if [page size] is set to zero.
  2287.  
  2288.     - [left margin]
  2289.  
  2290.       Specifies the number of blank columns to precede the printed
  2291.       output on each line.
  2292.  
  2293.     - [right margin]
  2294.  
  2295.       Specifies the column position at which to truncate each printed
  2296.       line. This column position is relative to column zero of the
  2297.       printed output, NOT the file being printed. If zero is specified,
  2298.       lines are not truncated.
  2299.  
  2300.     - [options]
  2301.  
  2302.       The following [options] can be specified:
  2303.                                                    System Functions   43
  2304.  
  2305.  
  2306.       h - prints a "header" at the top of each page. The header is
  2307.           specified in the "mrksav" function when printing. This option
  2308.           is ignored if [page size] is zero.
  2309.  
  2310.       f - prints a "footer" at the top of each page. The footer is
  2311.           specified in the "mrksav" function when printing. This option
  2312.           is ignored if [page size] is zero.
  2313.  
  2314.       s - adds a separator line after the header line and before the
  2315.           footer line.
  2316.  
  2317.       p - prints a right-justified page number on the header and footer
  2318.           lines. If neither a header or footer was specified, a blank
  2319.           header line is assumed. This option is ignored if [page size]
  2320.           is zero.
  2321.  
  2322.       l - prints a line number at the beginning of each line.
  2323.  
  2324.       e - sends a formfeed character to the printer when printing is
  2325.           completed.
  2326.  
  2327.  
  2328.   syssnd  [0/1].
  2329.  
  2330.     Enables (1) or disables (0) sound from the PC speaker.
  2331.  
  2332.  
  2333.   qsysver.
  2334.  
  2335.     Returns the current version of The Aurora Editor.
  2336.  
  2337.  
  2338.   qsysos  [options].
  2339.  
  2340.     Returns the operating system name or the operating system version.
  2341.     The following [options] may be specified:
  2342.  
  2343.       v - return major OS version
  2344.       m - return minor OS version
  2345.  
  2346.     If no options are specified, the operation system name ("DOS") is
  2347.     returned.
  2348.  
  2349.  
  2350.   qsyspgm.
  2351.  
  2352.     Returns the name of The Aurora Editor .EXE file that is currently
  2353.     executing, without path information or the .EXE extension. For
  2354.     example:
  2355.  
  2356.       qsyspgm.           // returns "A" or "A3"
  2357.                                                    System Functions   44
  2358.  
  2359.  
  2360.   qsysvar  [var name].
  2361.  
  2362.     Returns the environment string for the specified environment
  2363.     variable [var name]. [var name] must be in upper case. For example:
  2364.  
  2365.       qsysvar "PATH".   // returns the DOS PATH string
  2366.  
  2367.     This function returns null if the environment variable is not found.
  2368.  
  2369.  
  2370.   3-14  Timer Functions
  2371.   ─────────────────────
  2372.  
  2373.   Timer functions are used to create and destroy system "timers". Timers
  2374.   are used to automatically call user-defined functions at a specified
  2375.   time and date, or at periodic intervals. The "qtim" function also
  2376.   returns date and time information. Timer function names use the prefix
  2377.   "tim".
  2378.  
  2379.  
  2380.   timint  [timerid]  [interval]  [obj]  [fun]  [arg 1]  [arg 2] ...
  2381.  
  2382.     Sets an interval timer to call the function [fun] in the object
  2383.     [obj] with arguments [arg 1], [arg 2], etc. The function is called
  2384.     for every time interval (in milliseconds) specified by [interval].
  2385.  
  2386.     If [obj] is null, then the current "event" object is used. The
  2387.     [timerid] can be 0-9, and uniquely identifies the timer. Note that
  2388.     the first call to [fun] will occur after the specified time
  2389.     interval, not after the call. For example:
  2390.  
  2391.       timint 3 1000 @ %timer3.
  2392.  
  2393.     The example above sets timer 3 to call the function "timer3" every
  2394.     second.
  2395.  
  2396.     This function returns 1 if success or null if failure.
  2397.  
  2398.  
  2399.   timalm  [timerid]  [year(YYYY)]  [month(MM)]  [day(DD)]
  2400.           [dayofweek (0-6)]  [hour(HH)]  [min(mm)]  [sec(ss)]
  2401.           [obj]  [fun]  [arg 1]  [arg 2] ...
  2402.  
  2403.     Sets an "alarm" timer to call the function [fun] in the object [obj]
  2404.     with arguments [arg 1], [arg 2], etc. The function is called at the
  2405.     specified time and date.
  2406.  
  2407.     If [obj] is null, then the current "event" object is used. The
  2408.     [timerid] can be 0-9, and uniquely identifies the timer.
  2409.  
  2410.     "-1" may be specified as a "wildcard" for any of the date or time
  2411.     parameters. For example:
  2412.                                                     Timer Functions   45
  2413.  
  2414.  
  2415.       timalm  2 -1 3 -1 -1 11 0 0 @ "march".
  2416.  
  2417.     The example above sets timer 2 to call the function "march" in the
  2418.     current event object at 11 o'clock for every day in the month of
  2419.     march.
  2420.  
  2421.     This function returns 1 if success or null if failure.
  2422.  
  2423.  
  2424.   timdes  [timerid].
  2425.  
  2426.     Stops and destroys the timer [timerid]. This function destroys both
  2427.     interval and alarm timers. Returns 1 if success or null if failure.
  2428.  
  2429.  
  2430.   qtim.
  2431.  
  2432.     Returns the date and time as a character string of length 17, with
  2433.     the following format:
  2434.  
  2435.       "YYYYMMDDWhhmmssuu"
  2436.  
  2437.       YYYY - year
  2438.       MM   - month (1-12)
  2439.       DD   - day (1-31)
  2440.       W    - day of the week (0-6, 0=sunday)
  2441.       hh   - hour (0-23)
  2442.       mm   - minutes (0-59)
  2443.       ss   - seconds (0-59)
  2444.       uu   - hundredths of a second (0-99)
  2445.  
  2446.  
  2447.  
  2448.   3-15  Keyboard Functions
  2449.   ────────────────────────
  2450.  
  2451.   Keyboard functions are used to control and return information about
  2452.   the keyboard. Keyboard function names use the prefix "kbd".
  2453.  
  2454.  
  2455.   kbdenh  [0/1].
  2456.  
  2457.     Turns checking for the enhanced keyboard ON (1) or OFF (0). "kbdenh
  2458.     1" enables the enhanced keyboard keys if the enhanced keyboard is
  2459.     detected. "kbdenh 0" disables the enhanced keyboard keys.
  2460.  
  2461.  
  2462.   kbdrpt  [report mode].
  2463.  
  2464.     Determines how the interpreter calls keyboard event handler
  2465.     functions.
  2466.                                                  Keyboard Functions   46
  2467.  
  2468.  
  2469.     If [report mode] is "1" and a key is typed in, the interpreter
  2470.     attempts to call the user function "key" in the current event object
  2471.     with the following arguments:
  2472.  
  2473.       key name - name of the key ("k_s_f1", "k_a_y", etc.)
  2474.       key code - a 2 byte code identifying the key
  2475.       key char - the character typed in (if not a function key)
  2476.  
  2477.     If [report mode] is "2" and a key is typed in, the interpreter
  2478.     attempts to call a user function in the current event object with
  2479.     the same name as the "key name" argument above, with the following
  2480.     arguments:
  2481.  
  2482.       key code - a 2 byte code identifying the key
  2483.       key char - the character typed in (if not a function key)
  2484.  
  2485.     The default keyboard reporting mode is "2". This function returns 1
  2486.     if successful or null if failure.
  2487.  
  2488.  
  2489.   kbdclr.
  2490.  
  2491.     Removes all keystrokes from the keyboard buffer.
  2492.  
  2493.  
  2494.   qkbdshf  [mask].
  2495.  
  2496.      Returns the current shift key state of the keyboard "and-ed
  2497.      bitwise" with the integer specified by [mask]. The following table
  2498.      lists each bit position and its corresponding shift key:
  2499.  
  2500.        01h - right shift key is down    10h - scroll lock is ON
  2501.        02h - left shift key is down     20h - num lock is ON
  2502.        04h - ctrl key is down           40h - caps lock is ON
  2503.        08h - alt key is down            80h - insert state is ON
  2504.  
  2505.      For example, the value of "qkbdshf 3" is non-zero if either shift
  2506.      key is currently pressed down.
  2507.  
  2508.  
  2509.   qkbdchr  [options]  [keycode].
  2510.  
  2511.     This function waits for a key from the keyboard or translates
  2512.     [keycode] if [keycode] is specified. The following options can be
  2513.     specified:
  2514.  
  2515.       n - returns the function name assigned to [keycode].
  2516.       c - returns a keycode (no change if [keycode] is specified).
  2517.       h - returns "1" if a key has been pressed, otherwise it returns
  2518.           null. The key remains in the keyboard buffer.
  2519.  
  2520.                                                  Keyboard Functions   47
  2521.  
  2522.  
  2523.   3-16  Mouse Functions
  2524.   ─────────────────────
  2525.  
  2526.   Mouse functions are used to control and return information about the
  2527.   mouse. Mouse function names use the prefix "mou".
  2528.  
  2529.  
  2530.   mouini.
  2531.  
  2532.     Initializes the mouse and returns the mouse driver version (or null
  2533.     if failure). This function also displays the mouse pointer at the
  2534.     center of the screen, and enables the interpreter event queue to
  2535.     receive mouse events.
  2536.  
  2537.     In order for this function to return successfully, a DOS mouse
  2538.     driver (such as "mouse.com" or "mouse.sys") must be installed before
  2539.     the interpreter is invoked.
  2540.  
  2541.  
  2542.   moutrm.
  2543.  
  2544.     Deactivates the mouse driver and removes the mouse pointer from the
  2545.     screen. No more mouse events will be received by the interpreter
  2546.     event queue. Returns 1 if success or null if failure.
  2547.  
  2548.  
  2549.   mousen  [horz]  [vert]  [double speed].
  2550.  
  2551.     Sets the mouse sensitivity by setting the horizontal mickey-to-pixel
  2552.     [horz] and vertical mickey-to-pixel [vert] ratios, and by setting
  2553.     the double speed threshold [double speed]. The default value of
  2554.     these settings after calling "mouini" are:
  2555.  
  2556.       Horz mickey-to-pixel ratio:   8
  2557.       Vert mickey-to-pixel ratio:  16
  2558.       Double speed threshold:      64
  2559.  
  2560.     Returns 1 if success or null if failure.
  2561.  
  2562.  
  2563.   mourpt  [report mode].
  2564.  
  2565.     Determines how the interpreter calls mouse event handler functions.
  2566.                                                  Keyboard Functions   48
  2567.  
  2568.  
  2569.     If [report mode] is "1" and a mouse event is read from the event
  2570.     queue, the interpreter attempts to call the user function "mouse" in
  2571.     the current event object with the following arguments:
  2572.  
  2573.       mouse event name - name of the mouse event ("m_l_down", etc.)
  2574.       mouse x position - x position of mouse (virtual coordinates)
  2575.       mouse y position - y position of mouse (virtual coordinates)
  2576.  
  2577.     If [report mode] is "2" and a mouse event is read from the event
  2578.     queue, the interpreter attempts to call a user function in the
  2579.     current event object with the same name as the "mouse event name"
  2580.     above, with the following arguments:
  2581.  
  2582.       mouse x position - x position of mouse (virtual coordinates)
  2583.       mouse y position - y position of mouse (virtual coordinates)
  2584.  
  2585.     The default mouse reporting mode is "2". This function returns 1 if
  2586.     successful or null if failure.
  2587.  
  2588.  
  2589.   moupos  [x position]  [y position].
  2590.  
  2591.     Sets the position of the mouse cursor on the physical screen (0,0 is
  2592.     the upper left corner). Returns 1 if success or null if failure.
  2593.  
  2594.  
  2595.   mouvis  [0/1].
  2596.  
  2597.     Shows (1) or hides (0) the mouse cursor.
  2598.  
  2599.  
  2600.   qmoupos  [options].
  2601.  
  2602.     Returns the current mouse position on the physical screen (0,0 is
  2603.     the upper left corner). The following options may be specified:
  2604.  
  2605.       x - return the x position of the mouse
  2606.       y - return the y position of the mouse
  2607.  
  2608.     If no options are specified, the default is "x".
  2609.  
  2610.  
  2611.  
  2612.   3-17  Queue Functions
  2613.   ─────────────────────
  2614.  
  2615.   Queue functions are used to control and return information about the
  2616.   interpreter event queue. Queue function names generally use the prefix
  2617.   "que".
  2618.                                                     Queue Functions   49
  2619.  
  2620.  
  2621.   que  [fun]  [arg 1]  [arg 2] ...
  2622.  
  2623.     Places the function [fun] and its arguments [arg 1], [arg 2],
  2624.     etc. on the interpreter event queue. The next time the interpreter
  2625.     is idle, it will read the event queue and attempt to call [fun] in
  2626.     the current event object. Returns 1 if success or null if failure.
  2627.  
  2628.  
  2629.   send  [fun]  [arg 1]  [arg 2] ...
  2630.  
  2631.     This function is similar to the "que" function above, except that
  2632.     the interpreter event queue is bypassed. The function [fun] in the
  2633.     current event object is called immediately. This function returns
  2634.     the result of evaluating [fun].
  2635.  
  2636.  
  2637.   queobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2638.  
  2639.     This function works similar to the "que" function above, except that
  2640.     the interpreter attempts to call the function [fun] in the object
  2641.     [obj], not in the current event object.
  2642.  
  2643.  
  2644.   sendobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2645.  
  2646.     This function is similar to the "queobj" function above, except that
  2647.     the interpreter event queue is bypassed. The function [fun] in the
  2648.     object [obj] is called immediately. This function returns the result
  2649.     of executing the function [fun].
  2650.  
  2651.  
  2652.   quedis.
  2653.  
  2654.     This function reads the next event from the queue and "dispatches"
  2655.     it by calling the user event handler function associated with the
  2656.     event. If there is no event on the event queue, it will wait for an
  2657.     event to appear in the queue. This function returns when the user
  2658.     event handler function returns.
  2659.  
  2660.     If the function "quequi" (see below) is called in the user event
  2661.     handler, this function returns "0", otherwise it returns "1". This
  2662.     feature can be used to implement a dispatch loop which is not
  2663.     terminated until the "quequi" function is called. For example:
  2664.  
  2665.       while (quedis).
  2666.  
  2667.     The loop above will continue to dispatch events from the event queue
  2668.     until a user function calls "quequi".
  2669.                                                     Queue Functions   50
  2670.  
  2671.  
  2672.   quequi.
  2673.  
  2674.     Forces the "quedis" function (see above) to return null.
  2675.  
  2676.  
  2677.   quesiz  [size].
  2678.  
  2679.     Sets the interpreter event queue size to [size] events. The default
  2680.     size is 20 when the interpreter is invoked. Returns 1 if successful
  2681.     or null if failure.
  2682.  
  2683.  
  2684.  
  2685.   3-18  Video Functions
  2686.   ─────────────────────
  2687.  
  2688.   Video functions are used to control and return information about the
  2689.   video device. Video function names use the prefix "vid".
  2690.  
  2691.  
  2692.   vidcsz  [start]  [end].
  2693.  
  2694.     Sets the physical cursor size on the screen. [start] and [end]
  2695.     indicate the distance of the top and bottom of the cursor from the
  2696.     top of the character cell, on a scale of 0 to 100. For example,
  2697.     "vidcsz 0 100" sets the cursor size to the entire character cell.
  2698.  
  2699.     Specifying -1 for both [start] and [end] hides the cursor.
  2700.  
  2701.  
  2702.   vidbli  [0/1].
  2703.  
  2704.     Turns the video blink mode ON (1), or OFF (0). The video blink mode
  2705.     determines whether or not color attributes above 127 blink on and
  2706.     off. The video blink mode is OFF by default.
  2707.  
  2708.  
  2709.   vidfon  [columns]  [rows]  [back attr]  [back fill]  [options].
  2710.  
  2711.     Changes the video mode and/or sets the background color attribute
  2712.     and background fill string. You can do either operation separately
  2713.     or together.
  2714.  
  2715.     If [option] "c" is specified, the screen is captured and restored
  2716.     when exiting the interpreter.
  2717.  
  2718.     When changing the video mode, both [columns] and [rows] must be
  2719.     non-zero. [columns] may be 40 or 80 and [rows] may be 12, 14, 21,
  2720.     25, 28, 43, or 50. If [columns] or [rows] are zero or null, the
  2721.     video mode is not changed.
  2722.                                                     Video Functions   51
  2723.  
  2724.  
  2725.     To change the background attribute or fill string, specify the
  2726.     background color attribute [back attr] and fill string [back fill].
  2727.     If [back attr] is not specified, a value of 0 (black) is used. If
  2728.     [back fill] is not specified, a blank (ascii 32) is used. If neither
  2729.     are specified, the current background remains unchanged.
  2730.  
  2731.     Note: the string [back fill] can be a maximum of 50 chars long.
  2732.  
  2733.     This function returns 1 if successful or null if failure.
  2734.  
  2735.  
  2736.   vidorg  [x]  [y]  [options].
  2737.  
  2738.     Changes the mapping of the physical video device (the screen) to the
  2739.     virtual video device (the virtual screen is 64k x 64k characters).
  2740.     [x] and [y] specify the left and top positions of the physical
  2741.     device within the virtual device. The following [options] may be
  2742.     specified:
  2743.  
  2744.       r - [x] and [y] specify a mapping relative to the current mapping
  2745.       a - [x] and [y] specify an absolute mapping. In this case, [x] and
  2746.           [y] are referred to as "virtual coordinates".
  2747.  
  2748.     For example, "vidorg 12000 17896 %a" maps the top left corner of the
  2749.     screen to (12000, 17896) on the virtual screen.
  2750.  
  2751.     If no [options] are specified, the default option is "r".
  2752.  
  2753.     When the editor is invoked, the default mapping is (16000,16000).
  2754.     This function returns 1 if success or null if failure.
  2755.  
  2756.  
  2757.   vidpri  [string]  [x]  [y]  [attr]  [options]
  2758.  
  2759.     Prints the string [string] on the screen background at position [x],
  2760.     [y] using the color attribute [attr]. The following [options] may be
  2761.     specified:
  2762.  
  2763.       a - [x] and [y] are in absolute virtual screen coordinates.
  2764.       d - [x] and [y] are in physical device coordinates, with (0,0)
  2765.           as the left and top.
  2766.  
  2767.     If no [options] are specified, the default is "d". This function
  2768.     returns 1 if successful or null if failure.
  2769.  
  2770.  
  2771.   vidbor  [attr].
  2772.  
  2773.     Sets the screen overscan border color to [attr].
  2774.                                                     Video Functions   52
  2775.  
  2776.  
  2777.   vidoff.
  2778.  
  2779.     Turns off the video device. All screen updates are deferred until
  2780.     the function "vidon" is called.
  2781.  
  2782.  
  2783.   vidon.
  2784.  
  2785.     Turns on the video device.
  2786.  
  2787.  
  2788.   qvidmon.
  2789.  
  2790.     Returns 1 if the video device is in monochrome mode, otherwise it
  2791.     returns null.
  2792.  
  2793.  
  2794.   qvidp  [options].
  2795.  
  2796.     Returns the video parameter specified in [options]. One of the
  2797.     following [options] may be specified:
  2798.  
  2799.       l - returns the left virtual coordinate of the physical screen
  2800.       t - returns the top virtual coordinate of the physical screen
  2801.       r - returns the right virtual coordinate of the physical screen
  2802.       b - returns the bottom virtual coordinate of the physical screen
  2803.       x - returns the width of the screen
  2804.       y - returns the height of the screen
  2805.       k - returns the video blink mode (0=off, 1=on)
  2806.                                               Text Buffer Functions   53
  2807.  
  2808.  
  2809.   3-19  Text Buffer Functions
  2810.   ───────────────────────────
  2811.  
  2812.   Text buffer functions are used to control and return information about
  2813.   text buffers. A text buffer is a group of one or more lines of text
  2814.   and is used for editing files. There are many functions for creating,
  2815.   modifying, and destroying text buffers. Text buffer function names
  2816.   generally use the prefix "tex".
  2817.  
  2818.   Any number of text buffers can be created. Text buffers are organized
  2819.   into a global "text buffer list". The "default" text buffer is always
  2820.   at the top of the list.
  2821.  
  2822.   Text buffers are identified by a "text buffer name". Specifying a null
  2823.   text buffer name for any of the text buffer functions indicates that
  2824.   the "default" text buffer should be used.
  2825.  
  2826.   Note that changes made to a text buffer with these functions are not
  2827.   automatically displayed in any windows which might be associated with
  2828.   the text buffer. You must use the "windra" or "texdra" functions to
  2829.   update the window (see "Window Functions").
  2830.  
  2831.  
  2832.   texcre  [text buffer]  [line 1]  [line 2] ...
  2833.  
  2834.     Creates a new text buffer with the name [text buffer]. The new text
  2835.     buffer becomes the default text buffer. The arguments [line 1],
  2836.     [line 2], etc are the initial lines to be placed in the text buffer.
  2837.     If no initial lines are specified, the text buffer is created with
  2838.     one blank line.
  2839.  
  2840.     Returns 1 if successful or 0 if failure.
  2841.  
  2842.  
  2843.   texmen  [text buffer]  [line 1]  [line 2] ...
  2844.  
  2845.     Creates a new menu text buffer with the name [text buffer]. The new
  2846.     text buffer becomes the default text buffer. The arguments [line 1],
  2847.     [line 2], etc are the initial lines to place on the menu (see the
  2848.     section "Defining Menus" in The Aurora Editor Users Guide).
  2849.  
  2850.     Returns 1 if successful or 0 if failure.
  2851.  
  2852.  
  2853.   texdes  [text buffer].
  2854.  
  2855.     Destroys [text buffer] and all marks and windows associated with
  2856.     [text buffer]. The previous text buffer becomes the default text
  2857.     buffer. Returns 1 if successful or 0 if failure.
  2858.                                               Text Buffer Functions   54
  2859.  
  2860.  
  2861.   texloa  [text buffer]  [filename]  [options]  [line number]
  2862.           [delimiter]  [trunc length].
  2863.  
  2864.     Creates a new text buffer from the file [filename], or inserts the
  2865.     file [filename] into an existing text buffer. If [filename] contains
  2866.     wildcards or specifies a directory, then a directory listing is
  2867.     loaded. The "qtexdir" function can be used to return information
  2868.     about the directory listing.
  2869.  
  2870.     If [text buffer] does not exist, then a new text buffer with the
  2871.     name [text buffer] is created, and the file [filename] is loaded
  2872.     into it. The new text buffer becomes the default text buffer.
  2873.  
  2874.     If [text buffer] is an existing text buffer, then the file
  2875.     [filename] is inserted into [text buffer] after the line [line
  2876.     number]. If [line number] is 0 then it is inserted before the first
  2877.     line. If [line number] is -1 then it is inserted after the last
  2878.     line.
  2879.  
  2880.     The following [options] may be specified:
  2881.  
  2882.       b - the [delimiter] argument specifies a 1-byte line delimiter
  2883.       w - the [delimiter] argument specifies a 2-byte line delimiter
  2884.       h - include hidden files when loading a directory listing
  2885.       d - include subdirectories when loading a directory listing
  2886.       k - convert file sizes to 1K increments when loading a directory
  2887.           listing
  2888.       a - ignore the argument [filename] and load an internal ascii
  2889.           chart
  2890.  
  2891.     If options "b" or "w" are specified then [delimiter] specifies a
  2892.     byte or word line delimiter used to define the end of each line
  2893.     when loading the file.
  2894.  
  2895.     If options "b" or "w" are not specified and [delimiter] is zero,
  2896.     then the line delimiter defaults to "0D0Ah" (carriage return -
  2897.     linefeed).
  2898.  
  2899.     If options "b" or "w" are not specified and [delimiter] is greater
  2900.     than zero, then [delimiter] specifies the binary line length, and
  2901.     the file is loaded in "binary mode".
  2902.  
  2903.     [trunc length] specifies the maximum line length that can be loaded
  2904.     before wrapping to the next line. The maximum line length can not
  2905.     exceed 16000. If [trunclength] is zero or not specified, then a
  2906.     maximum line length of 16000 is assumed.
  2907.  
  2908.     This function returns 1 if a file was loaded, 2 if a directory
  2909.     listing was loaded, or null if failure.
  2910.                                               Text Buffer Functions   55
  2911.  
  2912.  
  2913.   texnam  [text buffer]  [new text buffer].
  2914.  
  2915.     Renames the text buffer [text buffer] to [new text buffer]. Returns
  2916.     1 if success or null if failure.
  2917.  
  2918.  
  2919.   texdra  [text buffer]  [line number].
  2920.  
  2921.     Draws the client area of all windows which currently display the
  2922.     text buffer [text buffer].
  2923.  
  2924.     If [line number] is specified, only the specified line number is
  2925.     drawn (this is faster than drawing all lines of the text buffer). If
  2926.     [line number] is -1, the line drawn is the line at the default
  2927.     cursor mark for the text buffer.
  2928.  
  2929.     Returns 1 if successful or 0 if failure.
  2930.  
  2931.  
  2932.   textop  [text buffer].
  2933.  
  2934.     Makes the text buffer [text buffer] the default text buffer by
  2935.     moving it to the top of the text buffer list. The default text
  2936.     buffer can be easily referenced in any text buffer function by
  2937.     specifying "null" for the [text buffer] argument.
  2938.  
  2939.  
  2940.   texdty  [text buffer]  [options].
  2941.  
  2942.     Sets or clears the dirty flag for the text buffer [text buffer]. The
  2943.     dirty flag is set automatically by any function which modifies the
  2944.     text buffer, and can be retrieved with the "qtexdty" function (see
  2945.     below). The following options can be specified:
  2946.  
  2947.       c - clear the dirty flag
  2948.       s - set the dirty flag
  2949.  
  2950.     If no options are specified, the default is "s".
  2951.  
  2952.  
  2953.   texdlm  [text buffer]  [delimiter]  [options].
  2954.  
  2955.     Sets the default byte or word line delimiter associated with the
  2956.     text buffer [text buffer]. The following options can be specified:
  2957.  
  2958.       b - [delimiter] is a 1-byte delimiter.
  2959.       w - [delimiter] is a 2-byte delimiter.
  2960.  
  2961.     If no [options] are specified and [delimiter] is non-zero, then
  2962.     [text buffer] will have no delimiter.
  2963.                                               Text Buffer Functions   56
  2964.  
  2965.  
  2966.   texusz  [text buffer]  [size].
  2967.  
  2968.     Sets the size of the undo/redo stack associated with the text buffer
  2969.     [text buffer]. The default size is zero.
  2970.  
  2971.  
  2972.   texovl  [text buffer]  [x]  [y]  [string].
  2973.  
  2974.     Overlays the string [string] at column [x], line [y] of the text
  2975.     buffer [text buffer]. If [x] or [y] are null, then the column and
  2976.     line of the default cursor mark are assumed. Returns 1 if success or
  2977.     null if failure.
  2978.  
  2979.  
  2980.   texinsx  [text buffer]  [x]  [y]  [string].
  2981.  
  2982.     Inserts the string [string] horizontally at column [x], line [y] of
  2983.     the text buffer [text buffer]. If [x] or [y] are null, then the
  2984.     column and line of the default cursor mark are assumed. Returns 1 if
  2985.     success or null if failure.
  2986.  
  2987.  
  2988.   texinsy  [text buffer]  [x]  [y]  [string]  [reps].
  2989.  
  2990.     Inserts the string [string] vertically at column [x] after line [y]
  2991.     of the text buffer [text buffer]. If [x] or [y] are null, then the
  2992.     column and line of the default cursor mark are assumed. [reps]
  2993.     indicates the number of lines to be inserted (if 0 or null is
  2994.     specified, one line is inserted). Returns 1 if success or null
  2995.     if failure.
  2996.  
  2997.  
  2998.   texdelx   [text buffer]  [x]  [y]  [length].
  2999.  
  3000.     Deletes the 1-line text segment of length [length] at column [x],
  3001.     line [y] of the text buffer [text buffer]. If [x] or [y] are null,
  3002.     then the column and line of the default cursor mark are assumed.
  3003.     Returns 1 if success or null if failure.
  3004.  
  3005.  
  3006.   texdely  [text buffer]  [y]  [reps].
  3007.  
  3008.     Deletes [reps] number of lines starting with line [y] in the text
  3009.     buffer [text buffer]. If [reps] is null or zero, then one line is
  3010.     deleted. If [y] is null then the line number of the default cursor
  3011.     mark is assumed. Returns 1 if success or null if failure.
  3012.                                               Text Buffer Functions   57
  3013.  
  3014.  
  3015.   qtex  [text buffer].
  3016.  
  3017.     Returns 1 if the text buffer [text buffer] exists, or null if it
  3018.     does not exist.
  3019.  
  3020.  
  3021.   qtexlin  [text buffer]  [line number]  [a]  [b].
  3022.  
  3023.     Returns a copy of the line [line number] from column [a] through
  3024.     column [b] in the text buffer [text buffer]. If [line number] is
  3025.     null or zero, then the line number of the default cursor mark is
  3026.     assumed. If [a] is null or zero, then "1" is used for [a]. If [b] is
  3027.     null or zero, then the line length used for [b]. This function
  3028.     returns null if failure.
  3029.  
  3030.  
  3031.   qtexend  [text buffer].
  3032.  
  3033.     Returns the number of lines in the text buffer [text buffer].
  3034.  
  3035.  
  3036.   qtexpre  [text buffer].
  3037.  
  3038.     Returns the previous text buffer before [text buffer] in the text
  3039.     buffer list. Returns null if [text buffer] is the last text buffer
  3040.     in the list.
  3041.  
  3042.  
  3043.   qtexdty  [text buffer].
  3044.  
  3045.     Returns 1 if the text buffer [text buffer] has been modified, or
  3046.     null if it has not been modified.
  3047.  
  3048.  
  3049.   qtextru  [text buffer].
  3050.  
  3051.     Returns 1 if the text buffer [text buffer] has been truncated during
  3052.     execution of the function "texloa". This can occur by interrupting
  3053.     "texloa" with <Ctrl-Break>, or when the system is out of space. This
  3054.     function returns null if [text buffer] has not been truncated.
  3055.  
  3056.  
  3057.   qtexbeg  [text buffer]  [line number].
  3058.  
  3059.     Returns the column position of the first non-blank character of line
  3060.     [line number] in the text buffer [text buffer]. If [line number] is
  3061.     zero or null, the line number of the default cursor mark is assumed.
  3062.                                               Text Buffer Functions   58
  3063.  
  3064.  
  3065.   qtexlen  [text buffer]  [line number].
  3066.  
  3067.     Returns the length of line [line number] in the text buffer [text
  3068.     buffer]. If [line number] is zero or null, the line number of the
  3069.     default cursor mark is assumed.
  3070.  
  3071.  
  3072.   qtexfld  [text buffer]  [line number]  [rel]  [options].
  3073.  
  3074.     If [rel] is not specified, this function returns the number of lines
  3075.     in the text fold beginning or ending at the line [line number].
  3076.  
  3077.     If [rel] is specified, the value of [rel] may be a positive or
  3078.     negative integer. The following [options] may also be specified:
  3079.  
  3080.       a - returns the line number that is the "apparent" distance of
  3081.           [rel] lines away from [line number]. The "apparent" distance
  3082.           is the visible distance on the screen (text folds count as one
  3083.           line).
  3084.       v - returns the "apparent" line number that is the actual distance
  3085.           of [rel] lines away from [line number].
  3086.       r - this option can be specified with options "a" or "v". It
  3087.           indicates the relative distance away from [line number] is to
  3088.           be returned, not a line number.
  3089.  
  3090.     If no [options] are specified, the default is "a".
  3091.  
  3092.     If [line number] is zero or null, the line number of the default
  3093.     cursor mark is assumed.
  3094.  
  3095.  
  3096.   qtextop.
  3097.  
  3098.     Returns the default text buffer at the "top" of the text buffer
  3099.     list.
  3100.  
  3101.  
  3102.   qtexmrk  [text buffer]  [options].
  3103.  
  3104.     Returns the default mark or cursor mark at the "top" of the mark
  3105.     list associated with the text buffer [text buffer]. The following
  3106.     [options] may be specified:
  3107.  
  3108.       c - returns the first cursor mark on the mark list
  3109.       m - returns the first non-cursor mark on the mark list
  3110.  
  3111.     If no options are specified, then the first mark on the mark list is
  3112.     returned (cursor mark or non-cursor mark).
  3113.                                               Text Buffer Functions   59
  3114.  
  3115.  
  3116.     Note: if there are any cursor marks associated with the text buffer,
  3117.     the interpreter always places them "ahead" of non-cursor marks on
  3118.     the mark list, so that calling this function with no [options] will
  3119.     always return a cursor mark.
  3120.  
  3121.  
  3122.   qtexbin  [text buffer].
  3123.  
  3124.     Returns the binary line length associated with the text buffer [text
  3125.     buffer]. If [text buffer] was not loaded in "binary mode", then this
  3126.     function returns null.
  3127.  
  3128.  
  3129.   qtexmen  [text buffer]  [line number]  [options].
  3130.  
  3131.     Returns information about the menu text buffer [text buffer] created
  3132.     with the "texmen" function. If [line number] is null or zero, the
  3133.     line number of the default cursor mark is assumed. The following
  3134.     [options] may be specified:
  3135.  
  3136.       c - return the position of the highlight character at [line
  3137.           number]
  3138.       w - return the menu width
  3139.       n - return the menu item description at [line number]
  3140.       f - return the macro code for the menu item at [line number]
  3141.       y - return last cursor position on the menu text buffer
  3142.  
  3143.     (see also "Defining Menus" in The Aurora Editor Users Guide).
  3144.  
  3145.  
  3146.   qtexdir  [options].
  3147.  
  3148.     Returns information about the most recently loaded directory listing
  3149.     loaded with the "texloa" function. The following options may be
  3150.     specified:
  3151.  
  3152.       d - return the number of subdirectories in the directory listing
  3153.       f - return the number of files in the directory listing
  3154.       s - return the sum of all the file sizes in the directory listing
  3155.  
  3156.  
  3157.   undbeg.
  3158.  
  3159.     Marks the beginning of a series of "tex" and "mrk" function calls
  3160.     which are considered to be one "undoable/redoable" operation. The
  3161.     current cursor mark position, and window size and position (if
  3162.     applicable) will be saved with the "undoable" operation.
  3163.                                               Text Buffer Functions   60
  3164.  
  3165.  
  3166.     The "undend" function (see below) marks the end of the "undoable"
  3167.     series of function calls.
  3168.  
  3169.  
  3170.   undend.
  3171.  
  3172.     Marks the end of a series of "tex" and "mrk" function calls started
  3173.     by the "undbeg" function (see above) which are to be considered as
  3174.     one "undoable" operation. All of the information required to "undo"
  3175.     the function calls between "undbeg" and "undend" is pushed onto an
  3176.     internal undo/redo stack.
  3177.  
  3178.  
  3179.   und  [text buffer]  [options].
  3180.  
  3181.     Restores the most recent changes made to the text buffer [text
  3182.     buffer] that were recorded with the "undbeg" and "undend" functions
  3183.     (see above). The following options may be specified:
  3184.  
  3185.       u - restores the most recent modification to the text buffer
  3186.       r - reverses the effects of the last "und %u" function call
  3187.  
  3188.     If no [options] are specified, the default is "u". This function
  3189.     returns 1 if success or null if failure.
  3190.                                                      Mark Functions   61
  3191.  
  3192.  
  3193.   3-20  Mark Functions
  3194.   ────────────────────
  3195.  
  3196.   Mark functions are used to control and return information about
  3197.   "marks". A mark defines an area of text within a specific text buffer,
  3198.   or specifies a "cursor" position in a text buffer. There are many
  3199.   functions for creating, modifying, and destroying marks. Mark function
  3200.   names use the prefix "mrk".
  3201.  
  3202.   Any number of marks can be associated with a text buffer. Marks are
  3203.   organized into a "mark list" attached to the text buffer. The
  3204.   "default" mark is at the top of the list.
  3205.  
  3206.   Marks are identified by a "mark name". Specifying a null mark name for
  3207.   any of the mark functions indicates that the default mark should be
  3208.   used.
  3209.  
  3210.   Using the mark functions, operations on text buffers can be restricted
  3211.   to the areas of text defined by the marks. "Cursor marks" are a
  3212.   special type of mark used to specify movable cursor positions within a
  3213.   text buffer. A Window can be attached to a text buffer via cursor
  3214.   marks (see "Window Functions").
  3215.  
  3216.   Note that changes made to a text buffer with these functions are not
  3217.   automatically displayed in any windows associated with the text
  3218.   buffer. You must use the "windra" or "texdra" functions to update the
  3219.   window (see "Text Buffer Functions" and "Window Functions").
  3220.  
  3221.  
  3222.   mrkset  [mark]  [options]  [text buffer]  [l]  [t]  [r]  [b]
  3223.           [s]  [e].
  3224.  
  3225.     Creates a new mark with the name [mark] for the text buffer [text
  3226.     buffer], or modifies the mark if it already exists. If a new
  3227.     "cursor" mark is created, it becomes the default mark for the text
  3228.     buffer. Cursor marks are always placed ahead of non-cursor marks on
  3229.     text buffer's mark list.
  3230.  
  3231.     [l], [t], [r], [b] are the left, top, right, and bottom coordinates
  3232.     of the mark, relative to the top-left corner of the text buffer. [s]
  3233.     and [e] are the start and end positions on the first and last lines
  3234.     of the mark. [s] and [e] are currently used only by the "mrkfin"
  3235.     function.
  3236.  
  3237.     If [l] or [t] are null or zero, then the column and line of the
  3238.     default cursor mark in the text buffer are used. If [r] or [b] are
  3239.     null or zero, then [l] and [t] are used. If [s] or [e] are null or
  3240.     zero, then the left and right boundaries of the resulting mark are
  3241.     used.
  3242.                                                      Mark Functions   62
  3243.  
  3244.  
  3245.     The following [options] can be specified:
  3246.  
  3247.       c - the mark is a "cursor" mark, used to mark a movable position
  3248.           in a text buffer. The cursor mark becomes the default mark for
  3249.           the text buffer
  3250.       i - places the mark in "insert" mode if it is a cursor mark. If
  3251.           this option is not specified, the cursor mark is placed in
  3252.           "overlay" mode.
  3253.       r - the mark is a rectangular or "column" mark. If this option is
  3254.           not specified, the mark is a "line" mark.
  3255.       h - the mark is "hidden"
  3256.  
  3257.     This function returns 1 if success or null if failure.
  3258.  
  3259.  
  3260.   mrkdes  [mark].
  3261.  
  3262.     Destroys the mark [mark]. If [mark] was the default mark, then the
  3263.     previous mark in the mark list becomes the default mark. Returns 1
  3264.     if success or null if failure.
  3265.  
  3266.  
  3267.   mrknam  [mark]  [new mark].
  3268.  
  3269.     Renames the mark [mark] to [new mark]. Returns 1 if success or null
  3270.     if failure.
  3271.  
  3272.  
  3273.   mrktop  [mark].
  3274.  
  3275.     Makes the cursor mark [mark] the default mark by moving it to the
  3276.     top of the mark list. A non-cursor mark can only be made the default
  3277.     mark if no cursor mark exists for the text buffer.
  3278.  
  3279.  
  3280.   mrkcol  [mark]  [attr].
  3281.  
  3282.     Changes the display color for the mark [mark] to [attr]. If this
  3283.     function is not called, then the mark color is determined by the
  3284.     "wincol" function (see "Window Functions"). This call allows marks
  3285.     to have different colors. Returns 1 if success or null if failure.
  3286.  
  3287.  
  3288.   mrkdel  [mark].
  3289.  
  3290.     Deletes the text inside the mark [mark], and the mark itself. For
  3291.     "line" marks, this function deletes all lines in the mark. For
  3292.     rectangular or "column" marks, this function deletes all columns in
  3293.     the mark and shifts all columns to the right into the vacated area.
  3294.  
  3295.     Returns 1 if success or null if failure.
  3296.                                                      Mark Functions   63
  3297.  
  3298.  
  3299.   mrkins  [mark]  [text buffer]  [x]  [y].
  3300.  
  3301.     Copies the text inside the mark [mark] to column [x] line [y] in the
  3302.     text buffer [text buffer].
  3303.  
  3304.     If [text buffer] is not specified, then the text buffer associated
  3305.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3306.     column and line of the default cursor mark for the text buffer are
  3307.     assumed.
  3308.  
  3309.     For "line" marks, the new text is inserted vertically into [text
  3310.     buffer] after line [y]. For rectangular or "column" marks the new
  3311.     text is inserted horizontally into [text buffer] at column [x], line
  3312.     [y].
  3313.  
  3314.     Returns 1 if success or null if failure.
  3315.  
  3316.  
  3317.   mrkmov  [mark]  [text buffer]  [x]  [y].
  3318.  
  3319.     Moves the text inside the mark [mark] to column [x] line [y] in the
  3320.     text buffer [text buffer]. The mark itself is moved along with the
  3321.     text.
  3322.  
  3323.     If [text buffer] is not specified, then the text buffer associated
  3324.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3325.     column and line of the default cursor mark for the text buffer are
  3326.     assumed.
  3327.  
  3328.     For "line" marks, the text is moved vertically into [text buffer]
  3329.     after line [y]. For rectangular or "column" marks the text is moved
  3330.     horizontally into [text buffer] at column [x], line [y].
  3331.  
  3332.     Returns 1 if success or null if failure.
  3333.  
  3334.  
  3335.   mrkovl  [mark]  [text buffer]  [x]  [y].
  3336.  
  3337.     Overlays the text inside the mark [mark] at column [x] line [y] in
  3338.     the text buffer [text buffer].
  3339.  
  3340.     If [text buffer] is not specified, then the text buffer associated
  3341.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3342.     column and line of the default cursor mark for the text buffer are
  3343.     assumed.
  3344.  
  3345.     Returns 1 if success or null if failure.
  3346.                                                      Mark Functions   64
  3347.  
  3348.  
  3349.   mrkshf  [mark]  [shift]  [fill character].
  3350.  
  3351.     Shifts the text in the mark [mark] left or right by [shift] columns
  3352.     and fills the vacated columns with [fill character]. If the value of
  3353.     [shift] is negative, then the text is shifted left, otherwise the
  3354.     text is shifted right. If [fill character] is null then blanks are
  3355.     used. Returns 1 if success or null if failure.
  3356.  
  3357.  
  3358.   mrkfil  [mark]  [fillchar]  [a]  [b].
  3359.  
  3360.     Fills the text within the mark [mark] with the character [fill
  3361.     character]. If the mark is a "line" mark, then [a] and [b] are used
  3362.     as the left and right columns for the fill. [a] and [b] are ignored
  3363.     for "column" marks.
  3364.  
  3365.     Returns 1 if success or null if failure.
  3366.  
  3367.  
  3368.   mrkcas  [mark]  [options]  [a]  [b].
  3369.  
  3370.     Changes the case of the text within the mark [mark]. If the mark is
  3371.     a "line" mark, then [a] and [b] are used as the left and right
  3372.     columns for the case change. [a] and [b] are ignored for "column"
  3373.     marks. The following [options] can be specified:
  3374.  
  3375.       l - change the text to lower case
  3376.       u - change the text to upper case
  3377.  
  3378.     Specifying both options "l" and "u" will toggle the case of each
  3379.     character in the text. If no [options] are specified, the default is
  3380.     "u".
  3381.  
  3382.     This function returns 1 if success or null if failure.
  3383.  
  3384.  
  3385.   mrkjus  [mark]  [options]  [a]  [b].
  3386.  
  3387.     Right justifies, centers, or left justifies the text within the mark
  3388.     [mark]. If the mark is a "line" mark, then [a] and [b] are used as
  3389.     the left and right columns for the justification. [a] and [b] are
  3390.     ignored for "column" marks. The following [options] can be
  3391.     specified:
  3392.  
  3393.       l - left justifies the text in the mark
  3394.       c - centers the text in the mark
  3395.       r - right justifies the text in the mark
  3396.  
  3397.     If no [options] are specified, the default is "l". This function
  3398.     returns 1 if success or null if failure.
  3399.                                                      Mark Functions   65
  3400.  
  3401.  
  3402.   mrksrt  [mark]  [options].
  3403.  
  3404.     Sorts the lines in the mark [mark]. All portions of each line are
  3405.     included in the sort, even if the mark is a "column" mark. The
  3406.     portion of each line within the mark is the sort key. The following
  3407.     options may be specified:
  3408.  
  3409.       a - ascending sort
  3410.       d - descending sort
  3411.       i - ignore case when sorting
  3412.  
  3413.     If no [options] are specified, then the default is "a". This
  3414.     function returns 1 if success or null if failure.
  3415.  
  3416.  
  3417.   mrktab  [mark]  [tab width].
  3418.  
  3419.     Expands any tab characters (ascii 9) in the mark [mark]. If the mark
  3420.     is a "column" mark, the left and right edges the mark are ignored.
  3421.     [tab width] determines how much each tab character is expanded. [tab
  3422.     width] may be 2, 4 or 8.
  3423.  
  3424.     Returns 1 if success or null if failure.
  3425.  
  3426.  
  3427.   mrkrfl  [mark]  [text buffer]  [l]  [t]  [r]  [options]  [indent].
  3428.  
  3429.     Reflows the lines in the mark [mark]. All the text within each line
  3430.     is reflowed, even if the mark is a "column" mark. The reflowed text
  3431.     is inserted into the text buffer [text buffer] after line [t]. The
  3432.     original text within the mark remains unchanged. The reflowed text
  3433.     is formatted to fit between columns [l] and [r] in [text buffer].
  3434.     [indent] specifies the number of columns to indent the first line of
  3435.     the reflowed text.
  3436.  
  3437.     If [text buffer] has been loaded in "binary mode", it cannot be
  3438.     reflowed.
  3439.  
  3440.     If [text buffer] is not specified, then the text buffer of the
  3441.     default cursor mark is assumed. If [l], [t], or [r] are not
  3442.     specified, then the column and line of the default cursor mark are
  3443.     assumed.
  3444.  
  3445.     The following [options] may be specified:
  3446.  
  3447.       b - blank lines are preserved.
  3448.       r - justifies the reflowed text on both the left and right
  3449.           boundaries.
  3450.  
  3451.     This function returns the number of lines inserted in [text buffer],
  3452.     or null if failure.
  3453.                                                      Mark Functions   66
  3454.  
  3455.  
  3456.   mrksav  [mark]  [filename]  [options]  [delimiter]  [header]  [prtini].
  3457.  
  3458.     Saves the text within mark [mark] to the file [filename]. Specifying
  3459.     a filename such as PRN, LPT1, LPT2, etc. prints the text within the
  3460.     mark. The following [options] may be specified:
  3461.  
  3462.       a - the text is appended to [filename]
  3463.       b - the argument [delimiter] specifies a byte delimiter to be
  3464.           saved after each line.
  3465.       w - the argument [delimiter] specifies a word delimiter to be
  3466.           saved after each line.
  3467.       f - each line is saved without a delimiter.
  3468.       p - specifies that the saved file is to be formatted for printing
  3469.           using the print settings specified with the "sysprt" function,
  3470.           called before this function.
  3471.       i - specifies that only the string [prtini] is to be saved. The
  3472.           text within the mark is ignored. This can be used to send an
  3473.           initialization string to the printer.
  3474.       z - saves an end-of-file (ascii 26) character at the end of
  3475.           [filename]. If option "p" is specified, then a formfeed
  3476.           character (ascii 12) is sent to the printer when printing is
  3477.           completed.
  3478.  
  3479.     If [delimiter] is not specified, the delimiter associated with the
  3480.     mark's text buffer is used (text buffers loaded in binary mode have
  3481.     no delimiter).
  3482.  
  3483.     When option "p" is specified, the argument [header] can be used to
  3484.     print a header and/or footer string. The "sysprt" function must be
  3485.     called before this function and must specify the header or footer
  3486.     options.
  3487.  
  3488.     This function returns 1 if success or null if failure.
  3489.  
  3490.  
  3491.   mrkfin  [mark]  [search string]  [replace string]  [options]
  3492.           [cursor mark].
  3493.  
  3494.     Searches the text within the mark [mark] for [search string]. If
  3495.     [replace string] is specified, then [search string] is replaced with
  3496.     [replace string]. If the cursor mark [cursor mark] is specified and
  3497.     the search string is found, then the cursor mark is moved to the
  3498.     location where the search string was found.
  3499.  
  3500.     The following [options] may be specified:
  3501.  
  3502.       i - ignore case during the search
  3503.       r - search in "reverse" from the bottom to the top of the mark
  3504.                                                      Mark Functions   67
  3505.  
  3506.  
  3507.       a - replace all occurrences of [search string] with [replace
  3508.           string]
  3509.       w - search for "whole words" only
  3510.       x - search for the first character which also occurs in the search
  3511.           string
  3512.       y - search for the first character which does not occur in the
  3513.           search string
  3514.       z - force replace, even if the replace string is null
  3515.  
  3516.     If [replace string] or option "z" was specified, the number of
  3517.     replacements is returned, otherwise the column where the search
  3518.     string was found is returned. If nothing was found then null is
  3519.     returned.
  3520.  
  3521.  
  3522.   mrkrel  [mark]  [x]  [y]  [options]  [text buffer].
  3523.  
  3524.     Relocates the mark [mark] to a new location in the text buffer [text
  3525.     buffer]. If no text buffer is specified, then the text buffer
  3526.     associated with [mark] is assumed. The following [options] may be
  3527.     specified:
  3528.  
  3529.       a - [x] and [y] specify an absolute column and line position in
  3530.           the text buffer
  3531.       r - [x] and [y] specify a relative offset from the current left
  3532.           and top coordinates of [mark].
  3533.  
  3534.     If no [options] are specified, then "r" is assumed. This function
  3535.     returns 1 if success or null if failure.
  3536.  
  3537.  
  3538.   mrkfld  [mark]  [options].
  3539.  
  3540.     Folds or unfolds the lines of text contained within the mark [mark].
  3541.     The following [options] may be specified:
  3542.  
  3543.       f - creates a new text fold containing all lines within the mark.
  3544.       u - removes text folds contained within the mark. If option "a" is
  3545.           not specified, only "top-level" text folds are removed.
  3546.       a - removes all text folds contained within the mark when
  3547.           specified with the option "u".
  3548.  
  3549.     If options "u" and "f" are both specified, existing text folds are
  3550.     removed before the new text fold is created.
  3551.  
  3552.     If no [options] are specified, then "f" is assumed. This function
  3553.     returns 1 if success or null if failure.
  3554.                                                      Mark Functions   68
  3555.  
  3556.  
  3557.   qmrk  [mark].
  3558.  
  3559.     Returns 1 if the mark [mark] exists, or null if it does not exist.
  3560.  
  3561.  
  3562.   qmrkpre  [mark]  [options].
  3563.  
  3564.     Returns a previous mark before [mark] in the mark list. The
  3565.     following [options] may be specified:
  3566.  
  3567.       c - return the previous cursor mark before [mark]
  3568.       m - return the previous non-cursor mark before [mark]
  3569.  
  3570.     If no [options] are specified, then the previous mark (cursor or
  3571.     non-cursor) is returned. This function returns null if no previous
  3572.     mark is found.
  3573.  
  3574.  
  3575.   qmrktex  [mark].
  3576.  
  3577.     Returns the text buffer in which the mark [mark] is located.
  3578.  
  3579.  
  3580.   qmrkp    [mark]  [options].
  3581.  
  3582.     Returns a coordinate of the mark [mark], or the width or height of
  3583.     the mark [mark]. The following [options] may be specified:
  3584.  
  3585.       l - returns the left-most column of the mark
  3586.       t - returns the top line number of the mark
  3587.       r - returns the right-most column of the mark
  3588.       b - returns the bottom line number of the mark
  3589.  
  3590.       x - returns the width of the mark
  3591.       y - returns the height of the mark
  3592.  
  3593.  
  3594.   qmrkcol  [mark].
  3595.  
  3596.     Returns the column position of the cursor mark [mark].
  3597.  
  3598.  
  3599.   qmrklin  [mark].
  3600.  
  3601.     Returns the line number of the cursor mark [mark].
  3602.                                                      Mark Functions   69
  3603.  
  3604.  
  3605.   qmrkins  [mark].
  3606.  
  3607.     Returns the "insert mode" of the cursor mark [mark]. Returns "i" if
  3608.     the cursor mark is in insert mode, or "o" if the cursor mark is in
  3609.     overlay mode.
  3610.  
  3611.  
  3612.   qmrktyp  [mark].
  3613.  
  3614.     Returns "l" if [mark] is a "line" mark, or "r" if [mark] is a
  3615.     rectangular or "column" mark.
  3616.  
  3617.  
  3618.   qmrkbuf  [mark].
  3619.  
  3620.     Returns a string composed of the text within the "column" mark
  3621.     [mark]. This function is ignored for "line" marks.
  3622.  
  3623.     This function will return null if the area of the column mark
  3624.     exceeds 16000.
  3625.  
  3626.  
  3627.   qmrkwin  [mark].
  3628.  
  3629.     Returns the window name associated with the cursor mark [mark].
  3630.                                                    Window Functions   70
  3631.  
  3632.  
  3633.   3-21  Window Functions
  3634.   ──────────────────────
  3635.  
  3636.   Window functions are used to control and return information about
  3637.   windows. A window is a rectangular area of the screen which can used
  3638.   to display text buffers and marks, or to display other "child"
  3639.   windows. Window function names use the prefix "win".
  3640.  
  3641.   Any number of windows can be created. Windows are organized into a
  3642.   global "window list". The "default" window is at the top of the list.
  3643.  
  3644.   Windows are identified by a "window name". Specifying a null window
  3645.   name for any of the window functions indicates that the default window
  3646.   should be used.
  3647.  
  3648.   To display a text buffer in a window, the window must be attached to a
  3649.   cursor mark associated with the text buffer. Since a text buffer may
  3650.   have any number of cursor marks, any number of windows can used to
  3651.   display different areas of the same text buffer.
  3652.  
  3653.   Note that most window functions will not actually update windows on
  3654.   the screen, unless the function description explicitly specifies that
  3655.   they do. In this case, you must use the "windra" or "texdra" functions
  3656.   to update the window (see also "Text Buffer Functions").
  3657.  
  3658.  
  3659.   winset  [window]  [options].
  3660.  
  3661.     Creates a new window with the name [window], or hides/shows an
  3662.     existing window. The following [options] may be specified:
  3663.  
  3664.       h - hide the window
  3665.       d - show the window
  3666.  
  3667.     Windows can be created as "hidden". For example:
  3668.  
  3669.       winset "abc" %h.   // creates the hidden window "abc"
  3670.  
  3671.     If no [options] are specified, the default is "d". This function
  3672.     returns 1 if success of null if failure.
  3673.  
  3674.  
  3675.   windes  [window].
  3676.  
  3677.     Destroys the window [window] and removes it from the screen. Returns
  3678.     1 if success or null if failure.
  3679.                                                    Window Functions   71
  3680.  
  3681.  
  3682.   winnam  [window]  [new window].
  3683.  
  3684.     Renames the window [window] to [new window]. Returns 1 if success or
  3685.     null if failure.
  3686.  
  3687.  
  3688.   winttl  [window]  [title]  [options]  [title id].
  3689.  
  3690.     Sets a window title to the string [title] for the window [window].
  3691.     Each window can have up to 5 titles. The argument [title id]
  3692.     specifies which title is being set. [title id] can be 1 - 5 (if the
  3693.     title id is zero, null, or not specified, then "1" is assumed). Any
  3694.     combination of the following [options] can be specified:
  3695.  
  3696.       n - sets the title on north title bar.
  3697.       s - sets the title on south title bar.
  3698.       e - sets the title on east title bar.
  3699.       w - sets the title on west title bar.
  3700.  
  3701.       l - the title is left-justified in the title bar.
  3702.       c - the title is centered in the title bar.
  3703.       r - the title is right-justified in the title bar.
  3704.  
  3705.       d - draws the window title bar containing the title immediately
  3706.           after setting the title. "windra" is not needed.
  3707.  
  3708.       x - sets the title to the "default status line". The default
  3709.           status line has the following format:
  3710.  
  3711.              [HH]  C XXXXX L YYYYY of TTTTT
  3712.  
  3713.           The status line displays information about the text buffer
  3714.           associated with the window (if any). [HH] is the hex value of
  3715.           the character at the cursor, XXXXX and YYYYY are the column
  3716.           and line positions of the cursor mark, and TTTTT is the total
  3717.           number of lines in the text buffer.
  3718.  
  3719.       h - checks for the highlight character "&". Specifying "&" before
  3720.           a character in the title indicates that it is to be
  3721.           highlighted when displayed. The "&" character itself is not
  3722.           displayed.
  3723.  
  3724.       1 - the title is not padded with any spaces (left or right).
  3725.           Normally the title is padded with one space if it is left of
  3726.           right justified.
  3727.  
  3728.       z - hides the title. This can be used to specify a title for the
  3729.           end-of-text line (see the "wineot" function).
  3730.  
  3731.     This function returns 1 if success or null if failure.
  3732.                                                    Window Functions   72
  3733.  
  3734.  
  3735.   wineot  [window]  [title id].
  3736.  
  3737.     Sets the "end-of-text" line for the window [window] to the window
  3738.     title [title id] which was previously set with the "winttl" function
  3739.     (see above). The title should be hidden with option "z" when calling
  3740.     the winttl function.
  3741.  
  3742.     If [title id] is -1, then the following default end-of-text line is
  3743.     used: "≡≡≡≡≡≡ End of Text ≡≡≡≡≡≡".
  3744.  
  3745.  
  3746.   winmen  [window]  [menu bar id]  [item 1]  [item 2] ...
  3747.  
  3748.     Defines a menu bar for the window [window]. Up to five menu bars can
  3749.     be defined for one window. [item 1], [item 2], etc. are the items to
  3750.     be placed on the menu bar. [menu bar id] specifies which of the five
  3751.     menu bars is being defined, and can be any of the following values:
  3752.  
  3753.       0 - the primary menu bar at the top of the window, under the
  3754.           north title bar (if any)
  3755.       1 - menu bar 1 underneath the primary menu bar
  3756.       2 - menu bar 2 underneath menu bar 1
  3757.       3 - menu bar 3 at the bottom of the window, above the south
  3758.           title bar (if any)
  3759.       4 - vertical menu bar 4 at the left edge of the client area
  3760.  
  3761.     Each menu bar item may contain one ampersand character (&) which is
  3762.     not displayed, but indicates that the character following it is to
  3763.     be highlighted when displayed.
  3764.  
  3765.     This function returns 1 if success or null if failure.
  3766.  
  3767.  
  3768.   winmeh  [window]  [menu bar id]  [item number].
  3769.  
  3770.     Highlights or un-highlights the menu bar item [item number] on
  3771.     menu bar [menu bar id] on the window [window]. There can only be one
  3772.     highlighted item per menu bar. [item number] is the relative
  3773.     position of the menu bar item from the beginning of the menu bar (1
  3774.     for first item, 2 for the second, and so on).
  3775.  
  3776.     If [item number] is null or zero, then the highlight is removed from
  3777.     any currently highlighted item in the menu bar.
  3778.  
  3779.     This function returns the offset (in character positions) of the
  3780.     specified menu item from the beginning of the menu bar, or null if
  3781.     failure.
  3782.                                                    Window Functions   73
  3783.  
  3784.  
  3785.   wintic  [window]  [char]  [attr]  [char]  [attr] ...
  3786.  
  3787.     Defines one-character title bar icon controls for the window
  3788.     [window]. [char] specifies the character to be displayed for each
  3789.     control and [attr] specifies the color attribute of each control. If
  3790.     [attr] is null, then the default window control color is used.
  3791.  
  3792.     Controls are normally left-justified on the title bar. If any
  3793.     control is preceded by an (@) character, then that control and any
  3794.     controls following it will be right justified on the title bar. For
  3795.     example:
  3796.  
  3797.       wintic @ "≡" @ "@" @ "".
  3798.  
  3799.     In the example above, title bar controls are defined for the default
  3800.     window using the default control colors. The control "≡" is left
  3801.     justified, while the controls "" and "" are right justified.
  3802.  
  3803.     This function returns 1 if success or null if failure.
  3804.  
  3805.  
  3806.   windra  [window]  [options]  [line number].
  3807.  
  3808.     Draws the window components specified by [options]. [line number] is
  3809.     ignored for all options except the "l" and "a" options. Any
  3810.     combination of the following [options] may be specified:
  3811.  
  3812.       b - draws the window border
  3813.       p - draws the primary menu bar only
  3814.       m - draws all window menu bars
  3815.       w - draws the west title bar
  3816.       n - draws the north title bar
  3817.       e - draws the east title bar
  3818.       s - draws the south title bar
  3819.       h - draws the horizontal scroll bar
  3820.       v - draws the vertical scroll bar
  3821.       l - draws the line [line number] in the window. If this option is
  3822.           specified and [line number] is null or zero, then the line
  3823.           number of the default cursor mark is assumed.
  3824.       t - draws the client area of the window
  3825.       a - draws the client area of all windows with the same text buffer
  3826.           as [window]. If [line number] is specified, then only
  3827.           the specified line is drawn.
  3828.       c - draws the cursor
  3829.       u - draws the cursor and updates the client area if needed
  3830.       f - draws the frame (every part of the window except the client
  3831.           area)
  3832.                                                    Window Functions   74
  3833.  
  3834.  
  3835.     This function returns 1 if success or null if failure. If option "c"
  3836.     is specified, and the client area needs updating, then 2 is
  3837.     returned.
  3838.  
  3839.  
  3840.   winmrk  [window]  [mark].
  3841.  
  3842.     Associates the cursor mark [mark] with the window [window]. Only one
  3843.     cursor mark may be associated with a window at one time. The window
  3844.     will display the text buffer associated with the cursor mark.
  3845.     Windows that are not associated with a text buffer (such as message
  3846.     boxes or dialog box windows) do not need to use this call. This
  3847.     function returns 1 if success or null if failure.
  3848.  
  3849.  
  3850.   winpar  [parent]  [child].
  3851.  
  3852.     Makes the window [parent] the "parent" window of the window [child].
  3853.  
  3854.  
  3855.   winnex  [window 1]  [window 2].
  3856.  
  3857.     Changes the order of the windows on the screen by placing [window 2]
  3858.     on top of [window 1].
  3859.  
  3860.  
  3861.   winpre  [window 1]  [window 2].
  3862.  
  3863.     Changes the order of the windows on the screen by placing [window 1]
  3864.     on top of [window 2].
  3865.  
  3866.  
  3867.   winvib  [window].
  3868.  
  3869.     Creates a local video buffer for the window [window]. This is only
  3870.     needed for windows that have child windows (such as dialog boxes).
  3871.     Creating a local video buffer for the parent window will eliminate
  3872.     screen flicker when moving the window. Returns 1 if success or null
  3873.     if failure.
  3874.  
  3875.  
  3876.   wincol  [window]  [element]  [attr]  [element]  [attr] ...
  3877.  
  3878.     Sets the colors of specific window elements for the window [window].
  3879.     [element] is a one character code specifying a part of the window,
  3880.     and can be one of the following:
  3881.                                                    Window Functions   75
  3882.  
  3883.  
  3884.       b - border
  3885.       e - border corner
  3886.       0 - north title bar
  3887.       1 - south title bar
  3888.       c - window title bar controls (default color)
  3889.       m - menus
  3890.       i - menu character highlight
  3891.       x - menu bar item highlight
  3892.       d - menu disable
  3893.       s - scroll bars
  3894.       z - end-of-text line
  3895.       t - text or client area
  3896.       h - mark (default color)
  3897.       f - text folds
  3898.  
  3899.     [attr] is the color attribute (0-255). Using negative values from -1
  3900.     to -6 for [attr] have a special meaning:
  3901.  
  3902.       -1 - do not change the current value of this attribute
  3903.       -2 - use the default value for this attribute
  3904.       -3 - increment the value of this attribute
  3905.       -4 - decrement the value of this attribute
  3906.       -5 - increment the background color for this attribute
  3907.       -6 - decrement the background color for this attribute
  3908.  
  3909.  
  3910.   winbor  [window]  [x]  [y]  [xo]  [yo]  [options].
  3911.  
  3912.     Sets the border for the window [window]. [x] is the thickness for
  3913.     the left and right borders. [y] is the thickness for the top and
  3914.     bottom borders. [xo] and [yo] are the amount of horizontal and
  3915.     vertical overlap on the border corners. The following [options] are
  3916.     available:
  3917.  
  3918.       i - 3D inward effect
  3919.       o - 3D outward effect
  3920.       s - changes the size of other parts of the window to accommodate
  3921.           the new border sizes. If this option is not specified, the
  3922.           entire window may grow or shrink.
  3923.  
  3924.     For the following [options], the borders are drawn using the text
  3925.     graphics characters. [x], [y], [xo], and [yo] are ignored, the
  3926.     horizontal and vertical border thickness is always 1, and there is
  3927.     no overlap on the border corners:
  3928.  
  3929.       1 - single line
  3930.       2 - double horizontal
  3931.       3 - double vertical
  3932.       4 - double line
  3933.       5 - solid
  3934.       6 - blank
  3935.                                                    Window Functions   76
  3936.  
  3937.  
  3938.   winfra  [window]  [options]  [west title width]  [east title width]
  3939.           [west menu width]  [control location].
  3940.  
  3941.     Defines the window frame components to be displayed for the window
  3942.     [window]. [options] determine which window frame components are
  3943.     displayed. You can choose any combination of the following options:
  3944.  
  3945.       b - borders
  3946.       m - primary menu
  3947.       w - west title bar
  3948.       n - north title bar
  3949.       e - east title bar
  3950.       s - south title bar
  3951.       h - horizontal scroll bar
  3952.       v - vertical scroll bar
  3953.       1 - menu bar 1
  3954.       2 - menu bar 2
  3955.       3 - menu bar 3 (south)
  3956.       4 - menu bar 4 (west)
  3957.       z - south title controls
  3958.       > - place north title bar in the window border
  3959.  
  3960.       + - add specified options to existing window
  3961.       - - remove specified options from existing window
  3962.  
  3963.  
  3964.     The following arguments to "winfra" can also be specified:
  3965.  
  3966.       [west title width] - the width of the west title (if present)
  3967.       [east title width] - the width of the east title (if present)
  3968.       [west menu width]  - the width of the west menu bar (if present)
  3969.       [control location] - the location of the window title bar controls
  3970.                            (n=north title bar, s=south title bar)
  3971.  
  3972.  
  3973.   winshd  [window]  [bot]  [right]  [bot indent]  [right indent].
  3974.  
  3975.     Adds or removes the shadow on the right and bottom sides of the
  3976.     window [window]. [bot] and [right] specify the shadow thickness on
  3977.     the bottom and right borders. If [bot] and [right] are zero or null,
  3978.     the shadow is removed. [bot lead] and [right lead] specify the
  3979.     amount of indentation for the bottom and right shadows. Returns 1 if
  3980.     success or null if failure.
  3981.  
  3982.  
  3983.   winsh2  [window]  [attr]  [bot indent]  [right indent]
  3984.  
  3985.     Adds or removes a one-half width shadow on the right and bottom
  3986.     sides of the window [window]. This function is intended for use with
  3987.                                                    Window Functions   77
  3988.  
  3989.  
  3990.     stationary windows on a blank background (such as dialog box
  3991.     controls). [attr] is the shadow color. [bot lead] and [right lead]
  3992.     specify the amount of indentation for the bottom and right shadows.
  3993.     Returns 1 if success or null if failure.
  3994.  
  3995.  
  3996.   winscr  [window]  [x]  [y]  [options]  [reps].
  3997.  
  3998.     Scrolls the text buffer displayed in the window [window] to the
  3999.     position [x], [y]. The following [options] can be specified:
  4000.  
  4001.       r - [x] and [y] are relative to the current position (default)
  4002.       a - [x] and [y] designate the absolute column and line number
  4003.           to scroll to.
  4004.       d - the window contents are redrawn immediately after each scroll.
  4005.           There is no need to call "windra" or "texdra".
  4006.       c - the window cursor mark (if any) is moved to same extent that
  4007.           the window is scrolled.
  4008.       p - [y] is ignored and the window is scrolled up or down by the
  4009.           window height minus one line. If [y] is less than zero, the
  4010.           window is scrolled up. If [y] is greater than zero, the window
  4011.           is scrolled down.
  4012.  
  4013.     Note that this function will only redraw the window contents if the
  4014.     "d" option is specified. If the "d" option is not specified, use the
  4015.     "windra" and "texdra" functions to redraw.
  4016.  
  4017.     [reps] specifies the amount of scroll "repetitions" to occur (the
  4018.     default is 1). A value of [reps] greater than 1 used with the "d"
  4019.     option can provide for a "smooth scroll" effect.
  4020.  
  4021.     This function returns 1 if success or null if failure.
  4022.  
  4023.  
  4024.   winadj  [window]  [x]  [y].
  4025.  
  4026.     Scrolls the window [window] relative to the position of the cursor
  4027.     mark associated with the window. The cursor mark is not moved. The
  4028.     window is scrolled so that the cursor is [x] columns away from the
  4029.     left edge of the client area and [y] lines away from the top edge of
  4030.     the client area.
  4031.  
  4032.     If zero is specified for [x] or [y], the window is not scrolled in
  4033.     that dimension. If -1 is specified for [x] or [y], the window view
  4034.     is adjusted so that the cursor is placed in the center of the window
  4035.     for the specified dimension.
  4036.  
  4037.     Note that this call will not automatically redraw the text buffer in
  4038.     the window. Use the "windra" or "texdra" function to redraw the
  4039.     window.
  4040.                                                    Window Functions   78
  4041.  
  4042.  
  4043.     This function returns 1 if success or null if failure.
  4044.  
  4045.  
  4046.   winbar  [window]  [value]  [limit]  [options].
  4047.  
  4048.     Sets the thumb position on the horizontal or vertical scroll bars
  4049.     for the window [window]. If option "v" is not specified, then
  4050.     [limit] specifies the scroll bar range and [value] is the thumb
  4051.     position to set within that range. The following options may be
  4052.     specified:
  4053.  
  4054.       x - sets the thumb position on the horizontal scroll bar
  4055.       y - sets the thumb position on the vertical scroll bar
  4056.       d - draws the scroll bar immediately after setting the thumb.
  4057.           If this option is not specified, then "windra" must be used.
  4058.       v - [value] and [limit] specify the virtual x and y coordinates
  4059.           on the screen where the thumb should be set. The coordinates
  4060.           must be inside the scroll bar thumb ranges. This option can be
  4061.           used to allow the mouse to drag the scroll bar thumb.
  4062.  
  4063.     This function returns 1 if success or null if failure.
  4064.  
  4065.  
  4066.   winsiz  [window]  [l]  [t]  [r]  [b]  [reps]  [options]  [rel window].
  4067.  
  4068.     Changes the size and position of the window [window]. [l], [t], [r],
  4069.     and [t] specify the new window coordinates. The following [options]
  4070.     can be specified:
  4071.  
  4072.       r - coordinates are relative to the current window position
  4073.       a - coordinates are absolute (relative the "origin" - see below)
  4074.       c - coordinates specify the size of the client area, not the
  4075.           whole area of the window
  4076.       s - scrolls the window to keep the cursor mark visible, if
  4077.           necessary
  4078.  
  4079.     If option "a" is specified, the following options may also be
  4080.     specified:
  4081.  
  4082.       d - origin is at the top left corner of the screen
  4083.       w - origin is at the top left corner of the window [rel window]
  4084.       1 - origin is at the top left corner of the client area of the
  4085.           window [rel window]
  4086.       z - origin is at the virtual coordinates 0, 0
  4087.  
  4088.     If option "r" is specified, [reps] specifies the number of sizing
  4089.     repetitions (the default is 1).
  4090.                                                    Window Functions   79
  4091.  
  4092.  
  4093.     When a window is resized, all parts of the window are automatically
  4094.     redrawn ("windra" or "texdra" are not required). This function
  4095.     returns 1 if successful or null if failure.
  4096.  
  4097.  
  4098.   winmov  [window]  [l]  [t]  [reps]  [options]  [rel window].
  4099.  
  4100.     Moves the window [window] to the coordinates [l], [t]. This call is
  4101.     nearly identical to the function "winsiz" (see above), except that
  4102.     only the position of the window can be changed, not its relative
  4103.     size.
  4104.  
  4105.  
  4106.   wintil  [window]  [options]  [split thresh]  [limit].
  4107.  
  4108.     Tiles all windows on the screen, or "splits" the window [window]
  4109.     into tiles. [limit] specifies the maximum number of tiles. If
  4110.     [limit] is null or zero, then all windows will be tiled.
  4111.  
  4112.     [split thresh] specifies the number of splits that can occur in one
  4113.     direction before the next split occurs in a perpendicular direction.
  4114.     If [split thresh] is null or zero, then the default is 2.
  4115.  
  4116.     The following [options] may be specified:
  4117.  
  4118.       h - favor horizontal splits
  4119.       v - favor vertical splits
  4120.       l - tile only the window [window], and any windows which display
  4121.           the same text buffer as [window].
  4122.       b - reverse the tiling order by starting with the window on the
  4123.           bottom
  4124.  
  4125.     This function returns 1 if success or null if failure.
  4126.  
  4127.  
  4128.   qwin  [window].
  4129.  
  4130.     Returns 1 if the window [window] exists or null if it does not
  4131.     exist.
  4132.  
  4133.  
  4134.   qwinmrk  [window].
  4135.  
  4136.     Returns the cursor mark associated with the window [window], or null
  4137.     if failure.
  4138.  
  4139.  
  4140.   qwintex  [window].
  4141.  
  4142.     Returns the text buffer associated with the window [window], or null
  4143.     if failure.
  4144.                                                    Window Functions   80
  4145.  
  4146.  
  4147.   qwinx  [window]  [virtual x-coordinate].
  4148.  
  4149.     If [virtual x-coordinate] is specified:
  4150.       Returns the visible column number in the window [window] at the
  4151.       specified virtual x-coordinate, or null if failure.
  4152.  
  4153.     otherwise:
  4154.       Returns the left-most column number shown in the window [window].
  4155.  
  4156.  
  4157.   qwiny  [window]  [virtual y-coordinate].
  4158.  
  4159.     If [virtual y-coordinate] is specified:
  4160.       Returns the visible line number in the window [window] at the
  4161.       specified virtual y-coordinate, or null if failure.
  4162.  
  4163.     otherwise:
  4164.       Returns the top-most line number shown in the window [window].
  4165.  
  4166.  
  4167.   qwinbot.
  4168.  
  4169.     Returns the bottom-most window on the screen.
  4170.  
  4171.  
  4172.   qwintop  [options].
  4173.  
  4174.     Returns the top-most window on the screen. If no options are
  4175.     specified, the top-most "parent-less" window is returned. If option
  4176.     "z" is specified, the top-most window is returned, whether or not
  4177.     the window has a parent window (this is the "default" window at the
  4178.     top of the window list).
  4179.  
  4180.  
  4181.   qwinpre  [window]  [options].
  4182.  
  4183.     Returns the previous window in the window list before the window
  4184.     [window]. If option "z" is specified, then a child window may be
  4185.     returned, otherwise the closest window before [window] at the same
  4186.     level as [window] is returned. Returns null if failure.
  4187.  
  4188.  
  4189.   qwinnex  [window]  [options].
  4190.  
  4191.     Returns the next window in the window list after the window
  4192.     [window]. If option "z" is specified, then a child window may be
  4193.     returned, otherwise the closest window after [window] at the same
  4194.     level as [window] is returned. Returns null if failure.
  4195.                                                    Window Functions   81
  4196.  
  4197.  
  4198.   qwinpar  [window].
  4199.  
  4200.     Returns the parent window of [window] or null if failure.
  4201.  
  4202.  
  4203.   qwinchi  [window]  [options].
  4204.  
  4205.     Returns a child window of the window [window]. The following
  4206.     [options] may be specified:
  4207.  
  4208.       b - returns the bottom-most child window
  4209.       t - returns the top-most child window
  4210.  
  4211.     This function returns null if [window] has no child windows.
  4212.  
  4213.  
  4214.   qwinttl  [window]  [title id]  [options].
  4215.  
  4216.     Returns the title string specified by [title id] for the window
  4217.     [window]. if option "h" is specified, then this function returns the
  4218.     highlighted position within the title string (if any).
  4219.  
  4220.  
  4221.   qwincol  [window]  [element].
  4222.  
  4223.     Returns the numeric color attribute of the element [element] for the
  4224.     window [window]. See the function "wincol" for a list of one
  4225.     character element codes.
  4226.  
  4227.  
  4228.   qwinbor  [window]  [options].
  4229.  
  4230.     Returns the border thickness or border type for the window [window].
  4231.     One of the following [options] can be specified:
  4232.  
  4233.       x - returns the width of the left and right borders
  4234.       y - returns the height of the top and bottom borders
  4235.       t - returns the border type (see the "winbor" function)
  4236.  
  4237.  
  4238.   qwinp  [window]  [options].
  4239.  
  4240.     Returns the virtual coordinates, width, or height of [window]
  4241.     [options] can be any of the following:
  4242.  
  4243.       0 - returns a main window coordinate
  4244.       1 - returns a client window coordinate
  4245.                                                    Window Functions   82
  4246.  
  4247.  
  4248.       l - returns the left coordinate of the window
  4249.       t - returns the top coordinate of the window
  4250.       r - returns the right coordinate of the window
  4251.       b - returns the bottom coordinate of the window
  4252.  
  4253.       x - returns the width of the window (the width of the client area
  4254.           if option "1" is specified)
  4255.       y - returns the height of the window (the height of the client
  4256.           area if option "1" is specified)
  4257.       d - returns the height or width of the "visible" portion of the
  4258.           the window on the screen, when used with the "x" or "y"
  4259.           options above
  4260.  
  4261.  
  4262.   qwinfra  [window]  [component].
  4263.  
  4264.     Tests for the presence of the frame component [component] in the
  4265.     window [window]. See the function "winfra" for a list of one
  4266.     character component codes. This function returns a non-zero value if
  4267.     the specified [component] is present, otherwise null is returned.
  4268.  
  4269.  
  4270.   qwinrgn  [window]  [x]  [y].
  4271.  
  4272.     Returns an integer code identifying the region of the window
  4273.     [window] containing the virtual coordinates [x] and [y]. This
  4274.     function is useful for determining the window region on which a
  4275.     mouse click occurred. The following table shows the integer codes
  4276.     and the corresponding window regions.
  4277.                                                    Window Functions   83
  4278.  
  4279.  
  4280.       code         region
  4281.       ────         ──────
  4282.  
  4283.         0          [x], [y] are not in the window
  4284.         1          client area
  4285.  
  4286.         2          north border
  4287.         3          east border
  4288.  
  4289.         4          south border
  4290.         5          west border
  4291.         6          northwest border corner
  4292.         7          northeast border corner
  4293.         8          southeast border corner
  4294.         9          southwest border corner
  4295.  
  4296.        11          north title bar
  4297.        12          south title bar
  4298.        13          west title
  4299.        14          east title
  4300.  
  4301.        19          vertical & horizontal scroll bar intersection
  4302.  
  4303.        21          vert scroll bar up arrow
  4304.        22          vert scroll bar down arrow
  4305.        23          vert scroll bar page-up bar
  4306.        24          vert scroll bar page-down bar
  4307.        25          vert scroll bar thumb
  4308.  
  4309.        31          horz scroll bar left arrow
  4310.        32          horz scroll bar right arrow
  4311.        33          horz scroll bar page-left bar
  4312.        34          horz scroll bar page-right bar
  4313.        35          horz scroll bar thumb
  4314.  
  4315.        51 - 100    window title bar controls from left to right
  4316.  
  4317.        101- 200    primary menu bar items from left to right
  4318.        201- 300    menu bar 1 items from left to right
  4319.        301- 400    menu bar 2 items from left to right
  4320.        401- 500    menu bar 3 items from left to right
  4321.        501- 600    menu bar 4 items from top to bottom
  4322.  
  4323.  
  4324.   qwinbar  [window]  [limit]  [options].
  4325.  
  4326.     Returns the current position of the scroll bar thumb in the range
  4327.     0 - [limit] for the window [window]. The following [options] can be
  4328.     specified:
  4329.                                                    Window Functions   84
  4330.  
  4331.  
  4332.       x - horizontal scroll bar
  4333.       y - vertical scroll bar
  4334.  
  4335.     If no [options] are specified, the default is "y".
  4336.  
  4337.  
  4338.   qwincnt  [window].
  4339.  
  4340.     Returns the number of child windows for the parent window [window].
  4341.     If [window] is null, this function returns the total number of
  4342.     "parent-less" windows in the window list.
  4343.  
  4344.  
  4345.   qwinmen  [window]  [menu bar id]  [options]  [item].
  4346.  
  4347.     Returns information about the menu bar [menu bar id] on the window
  4348.     [window]. [item] is an integer specifying the relative position of a
  4349.     menu bar item from the beginning of the menu bar. If [item] is not
  4350.     specified, the currently highlighted menu bar item (if any) is
  4351.     assumed. The following [options] may be specified:
  4352.  
  4353.       s - returns the menu bar item string for [item]
  4354.       o - returns the offset (in columns) of [item] from the beginning
  4355.           of the menu bar
  4356.       c - returns the highlighted character for [item]
  4357.       n - returns the total number of menu bar items
  4358.  
  4359.  
  4360.   qwintic  [window]  [n].
  4361.  
  4362.     This function returns the "[n]th" one-character title bar control
  4363.     that was specified with the "wintic" function. For the left-most
  4364.     title bar control, n is "1".
  4365.                     The Aurora Macro Language and The Aurora Editor   85
  4366.  
  4367.  
  4368.   A-1  The Aurora Macro Language and The Aurora Editor
  4369.   ────────────────────────────────────────────────────
  4370.  
  4371.   This section describes some aspects of The Aurora Editor from the
  4372.   point of view of The Aurora Macro Language.
  4373.  
  4374.  
  4375.   The Aurora Editor is itself a compiled macro language program
  4376.   contained in the file A.X. The programs A.EXE and A3.EXE are macro
  4377.   language interpreters which execute A.X.
  4378.  
  4379.   The main macro source file for A.X is the file A.A. The file A.A does
  4380.   very little except to include ACFG.A (configuration settings), AMEN.A
  4381.   (menu definitions), ALIB.X, (compiled editor library functions),
  4382.   AKBD.A (keyboard and mouse definitions), and ATRN.A (text translation
  4383.   definitions). When A.A is compiled, all of the above files are
  4384.   combined and A.X is generated.
  4385.  
  4386.   When The Aurora Editor is initially started from the DOS command line,
  4387.   A.X is executed and the following things happen:
  4388.  
  4389.   - The configuration settings (in ACFG.A) are placed in the object
  4390.     "prf" via the "set" native function.
  4391.  
  4392.   - The editor menus (in AMEN.A) are created via the "winmen" and
  4393.     "texmen" native functions.
  4394.  
  4395.   - All editor library functions are included from the file ALIB.X.
  4396.     Library functions are the editor commands described in The Aurora
  4397.     Editor Users Guide.
  4398.  
  4399.   - The keyboard and mouse definition functions (in AKBD.A) are added to
  4400.     event handler objects such as "edit", "fmgr", "prompt", etc.
  4401.  
  4402.   - The text translation table (in ATRN.A) is created.
  4403.  
  4404.   - The history file (A.HIS) and saved key macros are loaded (if
  4405.     configured).
  4406.  
  4407.   - Edit windows and/or File Manager windows are created, depending
  4408.     on what was entered on the DOS command line or remembered from
  4409.     a previous edit session.
  4410.  
  4411.  
  4412.   It is important to keep the following things in mind when writing your
  4413.   own macro commands for The Aurora Editor:
  4414.  
  4415.   1) The top-most window displayed on the screen is always the "default"
  4416.      window, and can be referenced with a null window name in any of the
  4417.      "win" native functions.
  4418.                     The Aurora Macro Language and The Aurora Editor   86
  4419.  
  4420.  
  4421.      Likewise, the text buffer and cursor mark displayed in the top-most
  4422.      window are the "default" text buffer and the "default" mark. They
  4423.      can also be referenced with null text buffer and null mark names in
  4424.      the "tex" and "mrk" native functions.
  4425.  
  4426.   2) The file name displayed in an Edit window is the first title (title
  4427.      id "1") for the window, and can be accessed with the "qwinttl"
  4428.      function.
  4429.  
  4430.   2) When the user creates a marked block for use with the "block"
  4431.      functions (such as copy, move, delete, etc.), that mark can be
  4432.      referenced with the mark name "*". This mark cannot be referenced
  4433.      with a null mark name, since that would refer to the cursor mark.
  4434.  
  4435.   3) The Aurora Editor uses timer id's 6, 7, 8, and 9. This leaves timer
  4436.      id's 0 through 5 available.
  4437.  
  4438.   4) The Aurora Editor creates the following "event" objects:
  4439.  
  4440.        "edit"   - edit windows
  4441.        "fmgr"   - file manager windows
  4442.        "menu"   - menu windows
  4443.        "prompt" - prompt windows and edit fields
  4444.  
  4445.      The Aurora Editor sets the current event object based on the window
  4446.      type of the top-most window. For example, if the top-most window is
  4447.      a File Manager window, then the current event object is "fmgr".
  4448.  
  4449.      Other objects used created by The Aurora Editor are:
  4450.  
  4451.        "a"          - all windows
  4452.        "mon"        - all windows
  4453.        "win"        - movable or sizable windows
  4454.        "edit-fmgr"  - edit and file manger windows
  4455.        "dlg"        - dialog boxes
  4456.        "trn"        - text translation object (default)
  4457.  
  4458.